Interface RequestResponseTransformer

All Known Implementing Classes:
AbstractRequestResponseTransformer, AdyenAuthorizeAndCaptureRequestResponseTransformer, AdyenAuthorizeRequestResponseTransformer, AdyenCaptureRequestResponseTransformer, AdyenRefundRequestResponseTransformer, AdyenReverseAuthorizeRequestResponseTransformer

public interface RequestResponseTransformer
The transformer is used to create the request body for the Adyen requests and populate the payment response.
  • Method Details

    • canHandle

      boolean canHandle(String transactionType)
      Checks if this transformer can handle the specified transaction type.
      Parameters:
      transactionType - the transaction type of the request
      Returns:
      true if this transformer can be used for the specified request
    • createAdyenRequest

      Map<String,Object> createAdyenRequest(AdyenPaymentRequest adyenPaymentRequest)
      Creates the Adyen request body based on AdyenPaymentRequest.
      Parameters:
      adyenPaymentRequest - the adyen payment request
      Returns:
      the Adyen request body
      Throws:
      AdyenRequestCreationException - when a problem is encountered while creating a Adyen API request based on the provided AdyenPaymentRequest
    • populatePaymentResponse

      com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(AdyenPaymentRequest adyenPaymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, AdyenResponse adyenResponse)
      Populates the payment response based on the response from the Adyen API.
      Parameters:
      adyenPaymentRequest - the adyen payment request
      paymentResponse - the payment response to populate
      adyenResponse - the response from Adyen API
      Returns:
      the populated payment response
      Throws:
      AdyenResponseInterpretationException - when a problem is encountered while converting a Adyen API response into a PaymentResponse