Class DefaultAdyenSessionService

java.lang.Object
com.broadleafcommerce.adyen.service.DefaultAdyenSessionService
All Implemented Interfaces:
AdyenSessionService

public class DefaultAdyenSessionService extends Object implements AdyenSessionService
  • Constructor Details

    • DefaultAdyenSessionService

      public DefaultAdyenSessionService(AdyenProvider adyenProvider, AdyenConfigurationProperties configurationProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • createSession

      public Map<String,Object> createSession(@NonNull @NonNull SessionRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AdyenSessionService
      This method is responsible for calling Adyen init-session endpoint.
      Specified by:
      createSession in interface AdyenSessionService
      Parameters:
      request - The request to create a session.
      contextInfo - context information around the multi-tenant state
      Returns:
      the response from Adyen API.
    • buildCreateSessionRequest

      protected CreateCheckoutSessionRequest buildCreateSessionRequest(@NonNull @NonNull SessionRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • addSavedPaymentMethodAttributes

      protected void addSavedPaymentMethodAttributes(CreateCheckoutSessionRequest createCheckoutSessionRequest, SessionRequest request)
      this method expected to be invoked in 2 places: 1st during checkout process, in that case mode should be "ask for consent" - checkbox on "drop-in" plugin will be shown. 2nd during add saved payment method in payments section of user profile - no checkbox but always save.
      Parameters:
      createCheckoutSessionRequest -
      request -
    • convertAmount

      protected AdyenAmount convertAmount(@NonNull @NonNull javax.money.MonetaryAmount amount)
    • getAmountInMinorUnits

      protected Long getAmountInMinorUnits(@NonNull @NonNull javax.money.MonetaryAmount amount)
    • getBroadleafMultiTenantMetadata

      protected Map<String,String> getBroadleafMultiTenantMetadata(@NonNull @NonNull SessionRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getTenantId

      @Nullable protected String getTenantId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • getApplicationId

      @Nullable protected String getApplicationId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • getAdyenProvider

      protected AdyenProvider getAdyenProvider()
    • getConfigurationProperties

      protected AdyenConfigurationProperties getConfigurationProperties()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()