Interface ResponseTransformer
- All Known Implementing Classes:
AbstractBraintreeResponseTransformer
,BraintreeAuthorizeAndCaptureResponseTransformer
,BraintreeAuthorizeResponseTransformer
,BraintreeCaptureResponseTransformer
,BraintreeRefundResponseTransformer
,BraintreeReverseAuthorizeResponseTransformer
public interface ResponseTransformer
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if this transformer can handle the specified transaction type.com.broadleafcommerce.paymentgateway.domain.PaymentResponse
populatePaymentResponse
(BraintreePaymentRequest braintreePaymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, BraintreeResponse braintreeResponse) Populates the payment response based on the response from the Braintree 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
-
populatePaymentResponse
com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(BraintreePaymentRequest braintreePaymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, BraintreeResponse braintreeResponse) Populates the payment response based on the response from the Braintree API.- Parameters:
braintreePaymentRequest
- the Braintree payment requestpaymentResponse
- the payment response to populatebraintreeResponse
- the response from Braintree API- Returns:
- the populated payment response
- Throws:
BraintreeResponseInterpretationException
- when a problem is encountered while converting a Braintree API response into aPaymentResponse
-