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 AdyenPayPalExpressCheckoutRequest
buildAdyenPayPalExpressCheckoutRequest
(com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo, String applicationId, String tenantId) protected UpdateExpressPayPalOrderRequest
buildUpdateExpressPayPalOrderRequest
(@NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) protected AdyenAmount
convertAmount
(@NonNull javax.money.MonetaryAmount amount) protected <T> T
convertValue
(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef) protected List<AdyenDeliveryMethod>
getDeliveryMethods
(@NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) 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 changeprotected String
getIpAddress
(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentInfo paymentInfo) protected com.fasterxml.jackson.databind.ObjectMapper
protected String
getPaymentData
(@NonNull com.broadleafcommerce.paymentgateway.domain.UpdateGatewayPaymentRequest request) protected AdyenPayPalExpressCheckoutService
protected com.broadleafcommerce.common.extension.TypeFactory
modifyPaymentMethodProperties
(@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> T
protected String
serializeValue
(Object fromValue) protected void
setTaxTotal
(@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, wait
Methods 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:
modifyPaymentMethodProperties
in 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:
updateGatewayPayment
in 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:
getCallbackUrlKeys
in interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayPaymentModificationService
-
getGatewayType
- Specified by:
getGatewayType
in interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
-
getPayPalExpressCheckoutService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-