Class DefaultAdyenPayPalExpressCheckoutService
java.lang.Object
com.broadleafcommerce.adyen.service.DefaultAdyenPayPalExpressCheckoutService
- All Implemented Interfaces:
AdyenPayPalExpressCheckoutService
public class DefaultAdyenPayPalExpressCheckoutService
extends Object
implements AdyenPayPalExpressCheckoutService
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAdyenPayPalExpressCheckoutService
(AdyenProvider adyenProvider, AdyenConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionaddBroadleafMultiTenantMetadata
(@NonNull Map<String, Object> adyenRequest, String applicationId, String tenantId) addThreeDSData
(@NonNull Map<String, Object> adyenRequest, @NonNull AdyenPayPalExpressCheckoutRequest request) Adds the "authenticationData.threeDSRequestData.nativeThreeDS=preferred" to the request.buildPayPalPaymentMethodPayload
(@NonNull AdyenPayPalExpressCheckoutRequest request, String applicationId, String tenantId) protected <T> T
convertValue
(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef) createAdyenRequest
(@NonNull AdyenPayPalExpressCheckoutRequest request, String applicationId, String tenantId) protected AdyenProvider
getBroadleafMultiTenantMetadata
(String applicationId, String tenantId) protected AdyenConfigurationProperties
protected String
getMerchantAccount
(String applicationId, String tenantId) The PaymentTransaction#transactionReferenceId is typically passed as the reference.protected com.fasterxml.jackson.databind.ObjectMapper
protected String
getPlatformStore
(String applicationId, String tenantId) setupPayPalExpressInteraction
(AdyenPayPalExpressCheckoutRequest request, String applicationId, String tenantId) Initializes the PayPal express checkout interaction for Adyen.updatePayPalOrder
(@NonNull UpdateExpressPayPalOrderRequest request, String applicationId, String tenantId) Updates the PayPal Order object to help advance the PayPal express checkout interaction.
-
Constructor Details
-
DefaultAdyenPayPalExpressCheckoutService
public DefaultAdyenPayPalExpressCheckoutService(AdyenProvider adyenProvider, AdyenConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
setupPayPalExpressInteraction
public Map<String,Object> setupPayPalExpressInteraction(AdyenPayPalExpressCheckoutRequest request, @Nullable String applicationId, @Nullable String tenantId) Description copied from interface:AdyenPayPalExpressCheckoutService
Initializes the PayPal express checkout interaction for Adyen.- Specified by:
setupPayPalExpressInteraction
in interfaceAdyenPayPalExpressCheckoutService
- Parameters:
request
- Request object describing the data that is to be initialized.applicationId
- the current context's application id.tenantId
- the current context's tenant id.- Returns:
- The gateway's response to the setup request.
-
updatePayPalOrder
public UpdateExpressPayPalOrderResponse updatePayPalOrder(@NonNull @NonNull UpdateExpressPayPalOrderRequest request, @Nullable String applicationId, @Nullable String tenantId) Description copied from interface:AdyenPayPalExpressCheckoutService
Updates the PayPal Order object to help advance the PayPal express checkout interaction.- Specified by:
updatePayPalOrder
in interfaceAdyenPayPalExpressCheckoutService
- Parameters:
request
- Request object describing the data that is to be updated.applicationId
- the current context's application id.tenantId
- the current context's tenant id.- Returns:
- The gateway's response to the update.
-
createAdyenRequest
-
getMerchantAccount
The PaymentTransaction#transactionReferenceId is typically passed as the reference. In this scenario, we don't yet have a transaction. Therefore, when interpreting transaction results via webhooks, we need to recognize the PayPal express scenario -
getPlatformStore
-
buildPayPalPaymentMethodPayload
-
addThreeDSData
protected Map<String,Object> addThreeDSData(@NonNull @NonNull Map<String, Object> adyenRequest, @NonNull @NonNull AdyenPayPalExpressCheckoutRequest request) Adds the "authenticationData.threeDSRequestData.nativeThreeDS=preferred" to the request. It indicates that the payment page can handle 3D Secure 2 transactions natively.- Parameters:
adyenRequest
- the request to send to the Adyen APIrequest
- information about the payment that is to be created- Returns:
- the modified request
-
addBroadleafMultiTenantMetadata
-
getBroadleafMultiTenantMetadata
-
convertValue
protected <T> T convertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef) -
getAdyenProvider
-
getConfigProperties
-
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-