Outcome of a call to a payment provider's process method. Reports whether the payment completed, a redirect href to send the user to if it did not, any result message and, when one was created, the resulting PaymentTransaction.
Properties
| Property | Returns | Description |
|---|---|---|
| nextHref | String | This can be set if payment is not completed, in which case it should be a URL to redirect the user to complete payment |
| paymentCompleted | boolean | Returns true if the payment has been completed. A value of false does not necessarily indicate an error, if nextHref is set it means the user needs to be redirected to complete payment |
| paymentTransaction | PaymentTransaction | If a PaymentTransaction was produced, return it here |
| resultMessage | String | This should be set if payment failed. It may optionally be set on successful payment |
| resultSummary | String | Just used for logging, return a summary of the outcome, ie success/failed |
Methods
isPaymentCompleted()
Returns: boolean
Returns true if the payment has been completed. A value of false does not necessarily indicate an error, if nextHref is set it means the user needs to be redirected to complete payment
getNextHref()
Returns: String
This can be set if payment is not completed, in which case it should be a URL to redirect the user to complete payment
getResultMessage()
Returns: String
This should be set if payment failed. It may optionally be set on successful payment
getResultSummary()
Returns: String
Just used for logging, return a summary of the outcome, ie success/failed
getPaymentTransaction()
Returns: PaymentTransaction
If a PaymentTransaction was produced, return it here