Implementing a payment information class

PolicyCenter uses a Gosu object to encapsulate information about a payment. PolicyCenter uses this object to send information about a payment or credit to the payment gateway plugin and the billing system. This object includes information about the billing account, the policy period, the payment instrument, and the amount to pay. You cannot use this object as an argument to a web service because it includes a reference to a PolicyPeriod entity. The payment gateway plugin must transform this object into an object that identifies the policy period by another value, such as the job number. The UpFrontPaymentStateContainerImpl method takeElectronicPayment creates a payment information object to use as an argument to the payment gateway plugin methods takePaymentUsingPaymentInstrument, requestSecureToken, and redirectToPaymentGateway. The UpFrontPaymentStateContainerImpl method removePayment creates a payment information object to use as an argument to the payment gateway plugin method refundFullAmountForTransaction. The Gosu class implements the gw.api.payment.paymentgateway.PaymentInformation interface. This interface provides the following properties:

  • TransactionAmount – The BigDecimal value to pay or credit.
  • TransactionCurrency – The Currency value to use for the payment or credit.
  • BillingAccountNumber – The String value that identifier the account in the billing system.
  • PolicyPeriod – The PolicyPeriod to which the payment applies.
  • PaymentInstrument – The String value that the user interface displays for the payment instrument
  • TransactionTypeCode – The PaymentTransactionType value for installments or reporting.
  • TransactionID – The String value that identifies the payment transaction, if required by the payment gateway or the billing system.
  • SaveForFutureUse – The boolean value that specifies whether to store the payment instrument to make it available on the user interface.
  • InternalPaymentReference – The String value that identifies the policy period to which the payment or credit applies. For integration with BillingCenter, set this property to the job number.

The gw.gw.payment.paymentgateway.impl.PaymentInformationBase class is a demonstration implementation of the payment instrument. Edit this class or create your own implementation to support the requirements of your payment gateway and billing system. If BillingCenter is your billing system, use the payments web service API provided by PaymentAPI to manage suspense payments. Create a suspense payment for a successful payment transaction. Remove a suspense payment for a successful credit transaction.