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
Modifier and Type | Field and Description |
---|---|
protected Money |
amount
If this was a Transaction request, it will be the amount that was sent back from the gateway
|
protected AddressDTO<PaymentResponseDTO> |
billTo
The billing address associated with this transaction
|
protected boolean |
completeCheckoutOnCallback
Sets whether or not this module should complete checkout on callback.
|
protected CreditCardDTO<PaymentResponseDTO> |
creditCard
for sale/authorize transactions, this will be the Credit Card object that was charged.
|
protected GatewayCustomerDTO<PaymentResponseDTO> |
customer
Any customer information that relates to this transaction
|
protected List<CustomerCreditDTO<PaymentResponseDTO>> |
customerCredits
Any customer credit accounts that have been processed.
|
protected List<GiftCardDTO<PaymentResponseDTO>> |
giftCards
Any gift cards that have been processed.
|
protected String |
orderId
The Order ID that this transaction is associated with
|
protected PaymentGatewayType |
paymentGatewayType
The Payment Gateway Type that this transaction response represents
|
protected String |
paymentToken
If this is a Tokenization request, this will hold the token sent back from the gateway
|
protected PaymentTransactionType |
paymentTransactionType
The Transaction Type of the Payment that this response represents
|
protected PaymentType |
paymentType
The Type of Payment that this transaction response represents
|
protected String |
rawResponse
A string representation of the response that came from the gateway.
|
protected Map<String,String> |
responseMap
A more convenient representation of
rawResponse to hold the response from the gateway. |
protected AddressDTO<PaymentResponseDTO> |
shipTo
If shipping information is captured on the gateway, the values sent back will be put here
|
protected boolean |
successful
Whether or not the transaction on the gateway was successful.
|
protected boolean |
valid
Whether or not this response was tampered with.
|
Constructor and Description |
---|
PaymentResponseDTO(PaymentType paymentType,
PaymentGatewayType gatewayType) |
protected GatewayCustomerDTO<PaymentResponseDTO> customer
protected AddressDTO<PaymentResponseDTO> shipTo
protected AddressDTO<PaymentResponseDTO> billTo
protected CreditCardDTO<PaymentResponseDTO> creditCard
protected List<GiftCardDTO<PaymentResponseDTO>> giftCards
protected List<CustomerCreditDTO<PaymentResponseDTO>> customerCredits
protected PaymentGatewayType paymentGatewayType
protected PaymentType paymentType
protected PaymentTransactionType paymentTransactionType
protected String orderId
protected Money amount
protected String paymentToken
protected boolean successful
protected boolean valid
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.
protected String rawResponse
responseMap
.protected Map<String,String> responseMap
rawResponse
to hold the response from the gateway.public PaymentResponseDTO(PaymentType paymentType, PaymentGatewayType gatewayType)
public GatewayCustomerDTO<PaymentResponseDTO> customer()
public CreditCardDTO<PaymentResponseDTO> creditCard()
public AddressDTO<PaymentResponseDTO> shipTo()
public AddressDTO<PaymentResponseDTO> billTo()
public GiftCardDTO<PaymentResponseDTO> giftCard()
public CustomerCreditDTO<PaymentResponseDTO> customerCredit()
public PaymentResponseDTO responseMap(String key, String value)
public PaymentResponseDTO orderId(String orderId)
public PaymentResponseDTO amount(Money amount)
public PaymentResponseDTO paymentToken(String paymentToken)
public PaymentResponseDTO paymentTransactionType(PaymentTransactionType paymentTransactionType)
public PaymentResponseDTO successful(boolean successful)
public PaymentResponseDTO completeCheckoutOnCallback(boolean completeCheckoutOnCallback)
public PaymentResponseDTO valid(boolean valid)
public PaymentResponseDTO rawResponse(String rawResponse)
public GatewayCustomerDTO<PaymentResponseDTO> getCustomer()
public AddressDTO<PaymentResponseDTO> getShipTo()
public AddressDTO<PaymentResponseDTO> getBillTo()
public List<GiftCardDTO<PaymentResponseDTO>> getGiftCards()
public List<CustomerCreditDTO<PaymentResponseDTO>> getCustomerCredits()
public PaymentType getPaymentType()
public PaymentGatewayType getPaymentGatewayType()
public String getOrderId()
public Money getAmount()
public String getPaymentToken()
public PaymentTransactionType getPaymentTransactionType()
public boolean isSuccessful()
public boolean isValid()
public boolean isCompleteCheckoutOnCallback()
public CreditCardDTO<PaymentResponseDTO> getCreditCard()
public String getRawResponse()
Copyright © 2022. All rights reserved.