Interface ResponseTransformer

All Known Implementing Classes:
AbstractBraintreeResponseTransformer, BraintreeAuthorizeAndCaptureResponseTransformer, BraintreeAuthorizeResponseTransformer, BraintreeCaptureResponseTransformer, BraintreeRefundResponseTransformer, BraintreeReverseAuthorizeResponseTransformer

public interface ResponseTransformer
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(String transactionType)
    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

      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
    • 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 request
      paymentResponse - the payment response to populate
      braintreeResponse - the response from Braintree API
      Returns:
      the populated payment response
      Throws:
      BraintreeResponseInterpretationException - when a problem is encountered while converting a Braintree API response into a PaymentResponse