public class Result
extends java.lang.Object
implements java.io.Serializable
This class stores information of a transaction in a payment backend system.
Payment backend implementation providers are free to extend this default implementation, but not required.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
static int | STATUS_FAILED
The status of the Result object for a failed transaction.
|
static int | STATUS_PENDING
The status of the Result object for a pending transaction.
|
static int | STATUS_SUCCESS
The status of the Result object for a successful transaction.
|
static int | STATUS_UNKNOWN
Unknown status of the Result object for a transaction.
|
Constructor and Description |
---|
Result(Credit credit, FinancialTransaction transaction, int status, java.lang.String reasonCode)
This method creates a new Results object with a Credit, a FinancialTransaction, the status and the reason code
|
Result(Credit credit, int status, java.lang.String reasonCode)
This method creates a new Results object with a Credit, the status and the reason code.
|
Result(Payment payment, FinancialTransaction transaction, int status, java.lang.String reasonCode)
This method creates a new Results object with a Payment, a FinancialTransaction, the status and the reason code
|
Result(PaymentInstruction paymentInstruction, int status, java.lang.String reasonCode)
This method creates a new Results object with a PaymentInstruction, the status and the reason code.
|
Result(Payment payment, int status, java.lang.String reasonCode)
This method creates a new Results object with a Payment, the status and the reason code.
|
Modifier and Type | Method and Description |
---|---|
Credit | getCredit()
This method gets the credit value object contained by this Result.
|
FinancialTransaction | getFianancialTransaction()
This method returns the FinancialTransaction object of this result.
|
Payment | getPayment()
This method gets the payment value object contained by this Result.
|
PaymentInstruction | getPaymentInstruction()
This method gets the PaymentInstruction value object contained by this Result.
|
PluginException | getPluginException()
This method gets the plugin exception.
|
java.lang.String | getReasonCode()
This method gets the backend return code.
|
java.lang.String | getReasonMessage()
This method gets the reason message related the reason code.
|
int | getStatus()
This method returns the status of the Result.
|
java.lang.String | getStatusAsString()
This method gets the non-localized human-readable status.
|
boolean | isPaymentRequiresAttention()
This method checks if the Payment requires attention though it is successful.
|
boolean | isRecoverable()
This method gets checks if the related PaymentInstruction is recoverable.
|
void | setFianancialTransaction(FinancialTransaction transaction)
This method sets the FinancialTransaction object of this result.
|
void | setPaymentRequiresAttention(boolean paymentRequiresAttention)
This method marks if the payment requires attention though it is successful.
|
void | setPluginException(PluginException exception)
This method sets the plugin exception.
|
void | setReasonMessage(java.lang.String reasonMessage)
This method sets the detail reason message related to the reason code.
|
void | setRecoverable(boolean paraIsRecoverable)
This method gets marks if the related PaymentInstruction is recoverable.
|
java.lang.String | toString()
This method gets a readable form of the Result object.
|
public static final java.lang.String COPYRIGHT
public static final int STATUS_UNKNOWN
public static final int STATUS_SUCCESS
public static final int STATUS_PENDING
public static final int STATUS_FAILED
public Result(PaymentInstruction paymentInstruction, int status, java.lang.String reasonCode)
This method creates a new Results object with a PaymentInstruction, the status and the reason code.
public Result(Payment payment, int status, java.lang.String reasonCode)
This method creates a new Results object with a Payment, the status and the reason code.
public Result(Payment payment, FinancialTransaction transaction, int status, java.lang.String reasonCode)
public Result(Credit credit, int status, java.lang.String reasonCode)
This method creates a new Results object with a Credit, the status and the reason code.
public Result(Credit credit, FinancialTransaction transaction, int status, java.lang.String reasonCode)
This method creates a new Results object with a Credit, a FinancialTransaction, the status and the reason code
public Credit getCredit()
public Payment getPayment()
public PaymentInstruction getPaymentInstruction()
public void setPaymentRequiresAttention(boolean paymentRequiresAttention)
public boolean isPaymentRequiresAttention()
public void setPluginException(PluginException exception)
public PluginException getPluginException()
public java.lang.String getReasonCode()
public void setReasonMessage(java.lang.String reasonMessage)
public java.lang.String getReasonMessage()
public void setRecoverable(boolean paraIsRecoverable)
public boolean isRecoverable()
public int getStatus()
public java.lang.String getStatusAsString()
public java.lang.String toString()
This method gets a readable form of the Result object.
Warning: not localized, for debugging purposes only!public FinancialTransaction getFianancialTransaction()
public void setFianancialTransaction(FinancialTransaction transaction)