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

PropertyReturnsDescription
nextHrefStringThis can be set if payment is not completed, in which case it should be a URL to redirect the user to complete payment
paymentCompletedbooleanReturns 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
paymentTransactionPaymentTransactionIf a PaymentTransaction was produced, return it here
resultMessageStringThis should be set if payment failed. It may optionally be set on successful payment
resultSummaryStringJust 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

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.