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 Summary
Modifier and TypeMethodDescriptionbooleanChecks if this transformer can handle the specified transaction type.createAdyenRequest(AdyenPaymentRequest adyenPaymentRequest) Creates the Adyen request body based onAdyenPaymentRequest.com.broadleafcommerce.paymentgateway.domain.PaymentResponsepopulatePaymentResponse(AdyenPaymentRequest adyenPaymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, AdyenResponse adyenResponse) Populates the payment response based on the response from the Adyen API.
-
Method Details
-
canHandle
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
Creates the Adyen request body based onAdyenPaymentRequest.- 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 providedAdyenPaymentRequest
-
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 requestpaymentResponse- the payment response to populateadyenResponse- the response from Adyen API- Returns:
- the populated payment response
- Throws:
AdyenResponseInterpretationException- when a problem is encountered while converting a Adyen API response into aPaymentResponse
-