Class PaymentResponseDTO

java.lang.Object
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO

public class PaymentResponseDTO extends Object

The DTO object that represents the response coming back from any call to the Gateway. This can either wrap an API result call or a translated HTTP Web response. This can not only be the results of a transaction, but also a request for a Secure Token etc...

Note: the success and validity flags are set to true by default, unless otherwise overridden by specific gateway implementations

Author:
Elbert Bautista (elbertbautista)
  • Field Details

    • customer

      Any customer information that relates to this transaction
    • shipTo

      protected AddressDTO<PaymentResponseDTO> shipTo
      If shipping information is captured on the gateway, the values sent back will be put here
    • billTo

      protected AddressDTO<PaymentResponseDTO> billTo
      The billing address associated with this transaction
    • creditCard

      protected CreditCardDTO<PaymentResponseDTO> creditCard
      for sale/authorize transactions, this will be the Credit Card object that was charged. This data is useful for showing on an order confirmation screen.
    • giftCards

      protected List<GiftCardDTO<PaymentResponseDTO>> giftCards
      Any gift cards that have been processed. This data is useful for showing on an order confirmation screen
    • customerCredits

      protected List<CustomerCreditDTO<PaymentResponseDTO>> customerCredits
      Any customer credit accounts that have been processed. This data is useful for showing on an order confirmation screen
    • paymentGatewayType

      protected PaymentGatewayType paymentGatewayType
      The Payment Gateway Type that this transaction response represents
    • paymentType

      protected PaymentType paymentType
      The Type of Payment that this transaction response represents
    • paymentTransactionType

      protected PaymentTransactionType paymentTransactionType
      The Transaction Type of the Payment that this response represents
    • orderId

      protected String orderId
      The Order ID that this transaction is associated with
    • amount

      protected Money amount
      If this was a Transaction request, it will be the amount that was sent back from the gateway
    • paymentToken

      protected String paymentToken
      If this is a Tokenization request, this will hold the token sent back from the gateway
    • successful

      protected boolean successful
      Whether or not the transaction on the gateway was successful. This should be provided by the gateway alone.
    • valid

      protected boolean valid
      Whether or not this response was tampered with. This used to verify that the response that was received on the endpoint (which is intended to only be invoked from the payment gateway) actually came from the gateway and was not otherwise maliciously invoked by a 3rd-party.
    • completeCheckoutOnCallback

      protected boolean completeCheckoutOnCallback

      Sets whether or not this module should complete checkout on callback. In most Credit Card gateway implementation, this should be set to 'TRUE' and should not be configurable as the gateway expects it to tbe the final step in the checkout process.

      In gateways where it does not expect to be the last step in the checkout process, for example BLC Gift Card Module, PayPal Express Checkout, etc... The callback from the gateway can be configured whether or not to complete checkout.

    • rawResponse

      protected String rawResponse
      A string representation of the response that came from the gateway. This should be a string serialization of responseMap.
    • responseMap

      protected Map<String,String> responseMap
      A more convenient representation of rawResponse to hold the response from the gateway.
  • Constructor Details

  • Method Details