Build a payment gateway module for an old installation

Archived instructions for existing Fusion Owned installations; labels and available controls depend on the installed build.

Use the matching development kit

The source links to an archived gateway development kit. Its current availability and compatibility are not verified by this archive; use a kit matching the installed Fusion build.

  1. Unzip the kit and find customgateway.php.
  2. Rename it to your module name, such as yourgatewayname.php. Use lowercase characters and start with a letter.
  3. Replace every customgateway_ function prefix with the matching yourgatewayname_ prefix.

Keep a separate test copy of the site and module before changing a working payment integration.

Define the configuration

The source calls the required configuration entry yourgatewayname_config. It defines the module's friendly display name and the custom fields/options/settings it needs. The documented field types are text, dropdown, text area and yes/no (checkboxes). The sample in customgateway.php uses a PayPal example to demonstrate them. Keep merchant credentials in the protected module settings rather than hard-coding them into public output.

Return the payment button or checkout form

Implement yourgatewayname_link($PARAMS) to return the gateway-specific payment code. The archived example normally returns HTML for a form POST, and the available invoice/payment values are supplied through $PARAMS. Use the matching kit to identify its actual parameter keys. Check the invoice reference, amount and currency against the provider's request contract instead of assuming keys that the old article does not list.

Adapt the callback

The kit includes customgatewaycallback.php. Rename the callback to match the module and adapt its variables according to the sample comments and the fields returned by the payment provider. Verify the provider notification before updating an invoice. Review signatures, amount/currency matching, duplicate callbacks and retry handling with an authorized developer in a test environment. A browser returning to a success page is not proof of payment; do not send merchant secrets or full card data in a support question.