Implementing a payment gateway response class
PolicyCenter uses a Gosu object that represents a response from the payment gateway to track the result of any
request to the gateway. Many methods in the payment gateway plugin use a payment gateway response object as either
an argument or a return value. The up-front payment state container, the silent post servlet, and the payment
gateway forward page in the demonstration implementation of a payment gateway use or create these objects. The
Gosu class implements the gw.api.payment.paymentgateway.PaymentGatewayResponse interface. This
interface provides the following read-only properties:
Result– TheStringvalue of the code that the payment gateway returns, for example, “0” for successReferenceNumber– TheStringvalue that identifies the transactionResponseMessage– TheStringvalue that the payment gateway returns, for example, “Approved”Amount– TheStringvalue that the payment gateway charged to the credit cardToken– TheStringvalue that contains the secure token for the transactionOriginalTransactionID– TheStringvalue equal to theReferenceNumberof a previous transaction for crediting or checking the status of that transactionTransactionType– ThePaymentTransactionTypevalue for installments or reporting
The gw.payment.paymentgateway.impl.PaymentGatewayResponseBase class is a demonstration implementation of the payment gateway response. Edit this class or create your own implementation to support the requirements of your payment gateway.
