Class DefaultAdyenPaymentModificationService
java.lang.Object
com.broadleafcommerce.adyen.service.DefaultAdyenPaymentModificationService
- All Implemented Interfaces:
AdyenPaymentModificationService,com.broadleafcommerce.paymentgateway.service.PaymentGatewayPaymentModificationService,com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
public class DefaultAdyenPaymentModificationService
extends Object
implements AdyenPaymentModificationService
- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAdyenPaymentModificationService(AdyenPayPalExpressCheckoutService payPalExpressCheckoutService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected AdyenPayPalExpressCheckoutRequestbuildAdyenPayPalExpressCheckoutRequest(com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, String applicationId, String tenantId) protected UpdateExpressPayPalOrderRequestbuildUpdateExpressPayPalOrderRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) protected AdyenAmountconvertAmount(@NonNull javax.money.MonetaryAmount amount) protected <T> TconvertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef) protected List<AdyenDeliveryMethod>getDeliveryMethods(@NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) protected javax.money.MonetaryAmountgetInitialPaypalExpressAmount(com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo) Expect to include everything but fulfillment costs as they will be added on fulfillment method/address changeprotected StringgetIpAddress(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo) protected com.fasterxml.jackson.databind.ObjectMapperprotected StringgetPaymentData(@NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) protected AdyenPayPalExpressCheckoutServiceprotected com.broadleafcommerce.common.extension.TypeFactorymodifyPaymentMethodProperties(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, String applicationId, String tenantId) populateIpAddress(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, @NonNull Map<String, String> paymentMethodProperties) protected <T> Tprotected StringserializeValue(Object fromValue) protected voidsetTaxTotal(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, @NonNull UpdateExpressPayPalOrderRequest request) updateGatewayPayment(@NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request, String applicationId, String tenantId) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayPaymentModificationService
modifyPaymentMethodProperties
-
Constructor Details
-
DefaultAdyenPaymentModificationService
public DefaultAdyenPaymentModificationService(AdyenPayPalExpressCheckoutService payPalExpressCheckoutService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
modifyPaymentMethodProperties
public Map<String,String> modifyPaymentMethodProperties(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, @Nullable String applicationId, @Nullable String tenantId) - Specified by:
modifyPaymentMethodPropertiesin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayPaymentModificationService
-
updateGatewayPayment
public Map<String,Object> updateGatewayPayment(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request, @Nullable String applicationId, @Nullable String tenantId) - Specified by:
updateGatewayPaymentin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayPaymentModificationService
-
populateIpAddress
-
getIpAddress
@Nullable protected String getIpAddress(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo) -
buildAdyenPayPalExpressCheckoutRequest
protected AdyenPayPalExpressCheckoutRequest buildAdyenPayPalExpressCheckoutRequest(com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, @Nullable String applicationId, @Nullable String tenantId) -
getInitialPaypalExpressAmount
protected javax.money.MonetaryAmount getInitialPaypalExpressAmount(com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo) Expect to include everything but fulfillment costs as they will be added on fulfillment method/address change- Parameters:
paymentInfo- - the order's payment info- Returns:
- amount without fulfillment costs
-
convertAmount
-
buildUpdateExpressPayPalOrderRequest
protected UpdateExpressPayPalOrderRequest buildUpdateExpressPayPalOrderRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) -
setTaxTotal
protected void setTaxTotal(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, @NonNull @NonNull UpdateExpressPayPalOrderRequest request) -
getPaymentData
@Nullable protected String getPaymentData(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) -
getDeliveryMethods
protected List<AdyenDeliveryMethod> getDeliveryMethods(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) -
readValue
protected <T> T readValue(String fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
convertValue
protected <T> T convertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef) -
serializeValue
-
getCallbackUrlKeys
- Specified by:
getCallbackUrlKeysin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayPaymentModificationService
-
getGatewayType
- Specified by:
getGatewayTypein interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
-
getPayPalExpressCheckoutService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-