Implementing a payment instrument class

PolicyCenter uses a Gosu object that represents a credit card to send information to the payment gateway plugin and to transfer information to and from the billing system. Your billing system is typically the system of record for this information for known credit cards. The PaymentGatewayPlugin plugin method getCardDetails provides the tokenized credit card object to the payment gateway response processor, which transforms that object to a new payment instrument. If the user chose to save the credit card for future use, the response processor sends the payment instrument object to the billing system. The Payment screen retrieves payment instruments from the billing system and displays a String value to identify each payment instrument. The user selects a payment instrument or Other to specify a new payment instrument. The Gosu class implements the gw.plugin.billing.BillingPaymentInstrument interface. This interface provides the following properties:

  • PublicID – The String identifier of the payment instrument in the system of record
  • PaymentMethod – The AccountPaymentMethod typekey that specifies the payment method for the policy, which is either installments or reporting
  • DisplayName – The String value to display on the user interface
  • OneTime – The Boolean value that specifies whether this instrument is for use for an individual payment only
  • Token – The String value that identifies the credit card to the payment gateway
  • Detail – An optional String value to store arbitrary information that your systems require

The gw.plugin.billing.BillingPaymentInstrumentImpl 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 systems.