Payment gateway configuration plugin

PolicyCenter supports electronic payment of the up-front payment for a policy job. The PaymentGatewayConfigPlugin payment gateway configuration plugin uses properties to provide configuration setting values for communication with an electronic payment service. The Payment Gateway plugin uses these values to communicate with an electronic payment service.

The base configuration implements the plugin in the Gosu DefaultPaymentGatewayConfigPlugin class. You can modify the plugin to set the configuration values that you require. Alternatively, implement your own instance of the plugin to customize PolicyCenter application logic. You can use script parameters to specify the configuration settings. Using script parameters avoids having to change the plugin code if your payment gateway changes. To change the value of a script parameter, in PolicyCenter, navigate to Administration > Utilities > Script Parameters and then click the parameter to edit.

The following Gosu code example demonstrates this approach.

class CustomPaymentGatewayConfig implements PaymentGatewayConfigPlugin {

  /*
  * The URL to the deployed PolicyCenter application
  * @return The value of the PolicyCenterURL script parameter
  */
  override property get PolicyCenterURL(): String {
    return ScriptParameters.PolicyCenterURL
  }
...
}

The ScriptParameters.xml file contains the definition of the PolicyCenterURL script parameter.

The following table lists the configuration properties and their purpose.

Property

Description

PaymentGatewayConnectionTimeoutInSeconds

The length of time to wait for a response from the payment gateway, in seconds.

PaymentGatewayGetURL

The URL for HTTP GET commands on the payment gateway. PolicyCenter redirects the user to this address to take payment with a new instrument when the RedirectToPaymentGateway property has a value of true.

PaymentGatewayPartner

The payment gateway partner.

PaymentGatewayPassword

The password to access the payment gateway.

PaymentGatewayPostConnectionPORT

The connection port for HTTP POST commands on the payment gateway, for example, 443.

PaymentGatewayPostURL

The URL for HTTP POST commands on the payment gateway.

PaymentGatewayTransactionType

The transaction type of the payment gateway command, as a PaymentTransactionType typecode. PolicyCenter supports only the Sale transaction type.

PaymentGatewayUser

The user to access the payment gateway.

PaymentGatewayVendor

The payment gateway vendor, also known as the merchant.

PolicyCenterURL

The URL that the payment gateway uses to return information to PolicyCenter, such as http://mygwpcserver:8180/pc.

RedirectToPaymentGateway

Whether to redirect to the payment gateway for a payment that uses a new payment instrument. If this property is false, PolicyCenter informs the user that collection of electronic payment is not available.

See also