Class DefaultAdyenPayPalExpressCheckoutService

java.lang.Object
com.broadleafcommerce.adyen.service.DefaultAdyenPayPalExpressCheckoutService
All Implemented Interfaces:
AdyenPayPalExpressCheckoutService

public class DefaultAdyenPayPalExpressCheckoutService extends Object implements AdyenPayPalExpressCheckoutService
  • 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 interface AdyenPayPalExpressCheckoutService
      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 interface AdyenPayPalExpressCheckoutService
      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

      protected Map<String,Object> createAdyenRequest(@NonNull @NonNull AdyenPayPalExpressCheckoutRequest request, @Nullable String applicationId, @Nullable String tenantId)
    • getMerchantAccount

      protected String getMerchantAccount(@Nullable String applicationId, @Nullable String tenantId)
      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

      @Nullable protected String getPlatformStore(@Nullable String applicationId, @Nullable String tenantId)
    • buildPayPalPaymentMethodPayload

      protected Map<String,Object> buildPayPalPaymentMethodPayload(@NonNull @NonNull AdyenPayPalExpressCheckoutRequest request, @Nullable String applicationId, @Nullable String tenantId)
    • 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 API
      request - information about the payment that is to be created
      Returns:
      the modified request
    • addBroadleafMultiTenantMetadata

      protected Map<String,Object> addBroadleafMultiTenantMetadata(@NonNull @NonNull Map<String,Object> adyenRequest, @Nullable String applicationId, @Nullable String tenantId)
    • getBroadleafMultiTenantMetadata

      protected Map<String,String> getBroadleafMultiTenantMetadata(@Nullable String applicationId, @Nullable String tenantId)
    • convertValue

      protected <T> T convertValue(Object fromValue, com.fasterxml.jackson.core.type.TypeReference<T> toValueTypeRef)
    • getAdyenProvider

      protected AdyenProvider getAdyenProvider()
    • getConfigProperties

      protected AdyenConfigurationProperties getConfigProperties()
    • getObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()