Class PaymentTransactionFailureDetail
- All Implemented Interfaces:
Serializable
- Author:
- Chris Kittrell (ckittrell)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMap of specific attributes that have been gathered from the raw response.The timestamp when this transaction response was recordedThe type of transaction failure (hard vs soft failure)The type of transaction failureThe response code provided by the payment gateway which may represent a success or failureMessage describing the result of the transactionThe id of the payment.The id representing the customer's request to execute the transaction.javax.money.MonetaryAmount
The transaction amount that was executed against thePaymentSummary
.The id of the executed transaction.The transaction id known by the payment gateway.The status of the transaction.The type of transactions that were executed.boolean
Tells if this transaction has an indeterminate result.void
setAttributes
(Map<String, String> attributes) Map of specific attributes that have been gathered from the raw response.void
setDateRecorded
(Instant dateRecorded) The timestamp when this transaction response was recordedvoid
setDeclineType
(String declineType) The type of transaction failure (hard vs soft failure)void
setFailureType
(String failureType) The type of transaction failurevoid
setGatewayResponseCode
(String gatewayResponseCode) The response code provided by the payment gateway which may represent a success or failurevoid
setIndeterminateResult
(boolean indeterminateResult) Tells if this transaction has an indeterminate result.void
setMessage
(String message) Message describing the result of the transactionvoid
setNextAction
(NextAction nextAction) The next step required for the payment gateway to continue processing this payment.void
setPaymentId
(String paymentId) The id of the payment.void
setRequestId
(String requestId) The id representing the customer's request to execute the transaction.void
setThreeDSecureVerificationUrl
(String threeDSecureVerificationUrl) Deprecated.void
setTransactionAmount
(javax.money.MonetaryAmount transactionAmount) The transaction amount that was executed against thePaymentSummary
.void
setTransactionId
(String transactionId) The id of the executed transaction.void
setTransactionReferenceId
(String transactionReferenceId) The transaction id known by the payment gateway.void
setTransactionStatus
(String transactionStatus) The status of the transaction.void
setTransactionType
(String transactionType) The type of transactions that were executed.
-
Constructor Details
-
PaymentTransactionFailureDetail
public PaymentTransactionFailureDetail()
-
-
Method Details
-
getThreeDSecureVerificationUrl
-
getNextAction
-
getPaymentId
The id of the payment.- Returns:
- The id of the payment.
-
getTransactionType
The type of transactions that were executed.- Returns:
- The type of transactions that were executed.
- See Also:
-
getTransactionId
The id of the executed transaction.- Returns:
- The id of the executed transaction.
-
getTransactionReferenceId
The transaction id known by the payment gateway. This reference can be used to link the request to the gateway's record of the transaction in the case that the calling application does not receive a response from the gateway.- Returns:
- The transaction id known by the payment gateway
-
getTransactionStatus
The status of the transaction.- Returns:
- The status of the transaction.
- See Also:
-
getFailureType
The type of transaction failure- Returns:
- The type of transaction failure
- See Also:
-
getDeclineType
The type of transaction failure (hard vs soft failure)- Returns:
- The type of transaction failure (hard vs soft failure)
- See Also:
-
getGatewayResponseCode
The response code provided by the payment gateway which may represent a success or failure- Returns:
- The response code provided by the payment gateway which may represent a success or failure
-
getMessage
Message describing the result of the transaction- Returns:
- Message describing the result of the transaction
-
isIndeterminateResult
public boolean isIndeterminateResult()Tells if this transaction has an indeterminate result.Having an indeterminate result means that the true outcome of the transaction is not known. For example, if a transaction is sent to the payment processor but a network error occurred, it is not known to us whether the user was actually charged or not (thus, the result is indeterminate).
Transactions should be marked as indeterminate when sending to the payment processor, and then unmarked once a response is received, understood, and recorded. This means that a transaction in an indeterminate result state is expected during the sending to processor phase. However, if the transaction remains in that state for an excessive amount of time, something likely went wrong and the transaction will need to be reconciled. If the transaction changes from the sending to processor status but remains indeterminate, the transaction will also require reconciliation in that scenario.
Some situations which may lead to an indeterminate result:
- A transaction is sent to the processor, but a network error prevents us from receiving the response
- A transaction is sent to the processor, but the processor returns an unexpected error (e.g. 500 internal server error)
- A transaction is sent to the processor and a response is received, but cannot be recorded because Cart Services is down
- A transaction is sent to the processor and a response is received, but cannot be recorded because the database is down
-
getTransactionAmount
public javax.money.MonetaryAmount getTransactionAmount()The transaction amount that was executed against thePaymentSummary
.- Returns:
- The transaction amount that was executed against the
PaymentSummary
.
-
getRequestId
The id representing the customer's request to execute the transaction.- Returns:
- The id representing the customer's request to execute the transaction.
-
getDateRecorded
The timestamp when this transaction response was recorded- Returns:
- The timestamp when this transaction response was recorded
-
getAttributes
Map of specific attributes that have been gathered from the raw response. This should be used for data points that are to be used programmatically. For example, a gateway-specific transaction id that can be used to capture or refund the transaction. Note: It's very important that this does not include sensitive payment method data. Doing so will expand the PCI scope to include CartOperationServices and its related services.- Returns:
- Map of specific fields that have been gathered from the raw response
-
setPaymentId
The id of the payment.- Parameters:
paymentId
- The id of the payment.
-
setTransactionType
The type of transactions that were executed.- Parameters:
transactionType
- The type of transactions that were executed.- See Also:
-
setTransactionId
The id of the executed transaction.- Parameters:
transactionId
- The id of the executed transaction.
-
setTransactionReferenceId
The transaction id known by the payment gateway. This reference can be used to link the request to the gateway's record of the transaction in the case that the calling application does not receive a response from the gateway.- Parameters:
transactionReferenceId
- The transaction id known by the payment gateway
-
setTransactionStatus
The status of the transaction.- Parameters:
status
- The status of the transaction.- See Also:
-
setFailureType
The type of transaction failure- Parameters:
failureType
- The type of transaction failure- See Also:
-
setDeclineType
The type of transaction failure (hard vs soft failure)- Parameters:
failureType
- The type of transaction failure (hard vs soft failure)- See Also:
-
setGatewayResponseCode
The response code provided by the payment gateway which may represent a success or failure- Parameters:
gatewayResponseCode
- The response code provided by the payment gateway which may represent a success or failure
-
setMessage
Message describing the result of the transaction- Parameters:
message
- Message describing the result of the transaction
-
setThreeDSecureVerificationUrl
Deprecated.in favor ofnextAction
The gateway-provided url where the customer must verify that they are in fact the owner of the payment method. The customer is typically redirected to this location, but the page can also be rendered within an iframe if this is supported by the gateway.- Parameters:
threeDSecureVerificationUrl
- The gateway-provided url where the customer must verify that they are in fact the owner of the payment method.
-
setIndeterminateResult
public void setIndeterminateResult(boolean indeterminateResult) Tells if this transaction has an indeterminate result.Having an indeterminate result means that the true outcome of the transaction is not known. For example, if a transaction is sent to the payment processor but a network error occurred, it is not known to us whether the user was actually charged or not (thus, the result is indeterminate).
Transactions should be marked as indeterminate when sending to the payment processor, and then unmarked once a response is received, understood, and recorded. This means that a transaction in an indeterminate result state is expected during the sending to processor phase. However, if the transaction remains in that state for an excessive amount of time, something likely went wrong and the transaction will need to be reconciled. If the transaction changes from the sending to processor status but remains indeterminate, the transaction will also require reconciliation in that scenario.
Some situations which may lead to an indeterminate result:
- A transaction is sent to the processor, but a network error prevents us from receiving the response
- A transaction is sent to the processor, but the processor returns an unexpected error (e.g. 500 internal server error)
- A transaction is sent to the processor and a response is received, but cannot be recorded because Cart Services is down
- A transaction is sent to the processor and a response is received, but cannot be recorded because the database is down
-
setTransactionAmount
public void setTransactionAmount(javax.money.MonetaryAmount transactionAmount) The transaction amount that was executed against thePaymentSummary
.- Parameters:
transactionAmount
- The transaction amount that was executed against thePaymentSummary
.
-
setRequestId
The id representing the customer's request to execute the transaction.- Parameters:
requestId
- The id representing the customer's request to execute the transaction.
-
setDateRecorded
The timestamp when this transaction response was recorded- Parameters:
dateRecorded
- The timestamp when this transaction response was recorded
-
setAttributes
Map of specific attributes that have been gathered from the raw response. This should be used for data points that are to be used programmatically. For example, a gateway-specific transaction id that can be used to capture or refund the transaction. Note: It's very important that this does not include sensitive payment method data. Doing so will expand the PCI scope to include CartOperationServices and its related services.- Parameters:
attributes
- Map of specific fields that have been gathered from the raw response
-
setNextAction
The next step required for the payment gateway to continue processing this payment.- Parameters:
nextAction
- The next step required for the payment gateway to continue processing this payment.
-
nextAction