Class DefaultAdyenExternalCallService

java.lang.Object
com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<AdyenPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
com.broadleafcommerce.adyen.service.DefaultAdyenExternalCallService
All Implemented Interfaces:
AdyenExternalCallService, com.broadleafcommerce.paymentgateway.service.FailureCountExposable, com.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<AdyenPaymentRequest>

public class DefaultAdyenExternalCallService extends com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<AdyenPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse> implements AdyenExternalCallService
The default implementation for AdyenExternalCallService.
  • Constructor Details

  • Method Details

    • call

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse call(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest)
      Description copied from interface: AdyenExternalCallService
      Executes the payment request to the Adyen API.
      Specified by:
      call in interface AdyenExternalCallService
      Parameters:
      adyenPaymentRequest - the payment request that should be executed for the specified transaction type.
      Returns:
      the payment response
    • getServiceName

      public String getServiceName()
      Specified by:
      getServiceName in interface com.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<AdyenPaymentRequest>
    • communicateWithVendor

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse communicateWithVendor(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest)
      Specified by:
      communicateWithVendor in class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<AdyenPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
    • getFailureReportingThreshold

      public Integer getFailureReportingThreshold()
      Specified by:
      getFailureReportingThreshold in interface com.broadleafcommerce.paymentgateway.service.FailureCountExposable
      Specified by:
      getFailureReportingThreshold in class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<AdyenPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
    • buildPaymentResponse

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse buildPaymentResponse(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest)
    • getGatewayTransactionType

      protected String getGatewayTransactionType(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest)
    • identifyRequestResponseTransformer

      protected RequestResponseTransformer identifyRequestResponseTransformer(@NonNull @NonNull String transactionType)
    • executeRequest

      protected AdyenResponse executeRequest(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest)
    • executeAuthorize

      protected AdyenResponse executeAuthorize(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest, @NonNull @NonNull String currencyCode, @NonNull @NonNull RequestResponseTransformer requestResponseTransformer, @Nullable String applicationId, @Nullable String tenantId)
    • executeAuthorizeAndCapture

      protected AdyenResponse executeAuthorizeAndCapture(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest, @NonNull @NonNull String currencyCode, @NonNull @NonNull RequestResponseTransformer requestResponseTransformer, @Nullable String applicationId, @Nullable String tenantId)
    • executeReverseAuth

      protected AdyenResponse executeReverseAuth(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest, @NonNull @NonNull String currencyCode, @NonNull @NonNull RequestResponseTransformer requestResponseTransformer, @Nullable String applicationId, @Nullable String tenantId)
    • executeCapture

      protected AdyenResponse executeCapture(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest, @NonNull @NonNull String currencyCode, @NonNull @NonNull RequestResponseTransformer requestResponseTransformer, @Nullable String applicationId, @Nullable String tenantId)
    • executeRefund

      protected AdyenResponse executeRefund(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest, @NonNull @NonNull String currencyCode, @NonNull @NonNull RequestResponseTransformer requestResponseTransformer, @Nullable String applicationId, @Nullable String tenantId)
    • getPaymentData

      @Nullable protected Map<String,Object> getPaymentData(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest)
    • populateDetailsRequestFromDetails

      protected AdyenPaymentDetailsRequest populateDetailsRequestFromDetails(AdyenPaymentDetailsRequest request, @Nullable Map<String,Object> paymentData)
    • processProviderApiException

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse processProviderApiException(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest, @NonNull @NonNull ProviderApiException apiException, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • convertFromErrorJson

      protected AdyenErrorResponse convertFromErrorJson(@NonNull @NonNull org.springframework.web.reactive.function.client.WebClientResponseException receivedException, @NonNull @NonNull String transactionReferenceId)
    • handleExecuteCustomRequest

      protected AdyenResponse handleExecuteCustomRequest(@NonNull @NonNull AdyenPaymentRequest adyenPaymentRequest)
    • 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
    • getPaymentResponseUtil

      protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil getPaymentResponseUtil()
    • getAdyenProvider

      protected AdyenProvider getAdyenProvider()
    • getRequestResponseTransformers

      protected List<RequestResponseTransformer> getRequestResponseTransformers()
    • getMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
    • getTypeFactory

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

      protected ExternalAdyenProviderProperties getProperties()
    • getAdyenConfigurationProperties

      protected AdyenConfigurationProperties getAdyenConfigurationProperties()