Class PaymentResponseDTO
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Money
If this was a Transaction request, it will be the amount that was sent back from the gatewayprotected AddressDTO<PaymentResponseDTO>
The billing address associated with this transactionprotected boolean
Sets whether or not this module should complete checkout on callback.protected CreditCardDTO<PaymentResponseDTO>
for sale/authorize transactions, this will be the Credit Card object that was charged.protected GatewayCustomerDTO<PaymentResponseDTO>
Any customer information that relates to this transactionprotected List<CustomerCreditDTO<PaymentResponseDTO>>
Any customer credit accounts that have been processed.protected List<GiftCardDTO<PaymentResponseDTO>>
Any gift cards that have been processed.protected String
The Order ID that this transaction is associated withprotected PaymentGatewayType
The Payment Gateway Type that this transaction response representsprotected String
If this is a Tokenization request, this will hold the token sent back from the gatewayprotected PaymentTransactionType
The Transaction Type of the Payment that this response representsprotected PaymentType
The Type of Payment that this transaction response representsprotected String
A string representation of the response that came from the gateway.A more convenient representation ofrawResponse
to hold the response from the gateway.protected AddressDTO<PaymentResponseDTO>
If shipping information is captured on the gateway, the values sent back will be put hereprotected boolean
Whether or not the transaction on the gateway was successful.protected boolean
Whether or not this response was tampered with. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbillTo()
completeCheckoutOnCallback
(boolean completeCheckoutOnCallback) customer()
giftCard()
boolean
boolean
boolean
isValid()
paymentToken
(String paymentToken) paymentTransactionType
(PaymentTransactionType paymentTransactionType) rawResponse
(String rawResponse) responseMap
(String key, String value) shipTo()
successful
(boolean successful) valid
(boolean valid)
-
Field Details
-
customer
Any customer information that relates to this transaction -
shipTo
If shipping information is captured on the gateway, the values sent back will be put here -
billTo
The billing address associated with this transaction -
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
Any gift cards that have been processed. This data is useful for showing on an order confirmation screen -
customerCredits
Any customer credit accounts that have been processed. This data is useful for showing on an order confirmation screen -
paymentGatewayType
The Payment Gateway Type that this transaction response represents -
paymentType
The Type of Payment that this transaction response represents -
paymentTransactionType
The Transaction Type of the Payment that this response represents -
orderId
The Order ID that this transaction is associated with -
amount
If this was a Transaction request, it will be the amount that was sent back from the gateway -
paymentToken
If this is a Tokenization request, this will hold the token sent back from the gateway -
successful
protected boolean successfulWhether or not the transaction on the gateway was successful. This should be provided by the gateway alone. -
valid
protected boolean validWhether 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 completeCheckoutOnCallbackSets 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
A string representation of the response that came from the gateway. This should be a string serialization ofresponseMap
. -
responseMap
A more convenient representation ofrawResponse
to hold the response from the gateway.
-
-
Constructor Details
-
PaymentResponseDTO
-
-
Method Details
-
customer
-
creditCard
-
shipTo
-
billTo
-
giftCard
-
customerCredit
-
responseMap
-
orderId
-
amount
-
paymentToken
-
paymentTransactionType
-
successful
-
completeCheckoutOnCallback
-
valid
-
rawResponse
-
getCustomer
-
getShipTo
-
getBillTo
-
getGiftCards
-
getCustomerCredits
-
getPaymentType
-
getPaymentGatewayType
-
getOrderId
-
getAmount
-
getPaymentToken
-
getPaymentTransactionType
-
isSuccessful
public boolean isSuccessful() -
isValid
public boolean isValid() -
isCompleteCheckoutOnCallback
public boolean isCompleteCheckoutOnCallback() -
getCreditCard
-
getRawResponse
-
getResponseMap
-