Payment Gateway Integrations
Gateways connect Caribou's ecommerce functions to your merchant account. Most gateway providers also provide you with a merchant account and you pay a monthly fee on top of a transaction fee. The two types of gateways that are important to Caribou are merchant accounts that allow you to accept credit cards directly on your site and 3rd party gateways such as PayPal that require users to leave your site momentarily to complete their purchase. Adding a payment gateway is normally very easy. However, Caribou includes many gateways to choose from right out of the box.
Included Gateways
Caribou includes a variety of merchant account and 3rd party gateways for you to choose from.
The main thing of note for each gateway is whether or not the gateway integration supports auto-recurring billing. Auto-recurring billing is a special feature of some gateways that allows you to charge subscription payments automatically each month. Caribou will be notified of each successful payment and the user's subscription will be renewed automatically for as long as payments are made.
| Name | Type | Auto-Recur? | Notes |
| Authorize.net | merchant | Yes | Must use Silent URL Post feature. |
| E-xact | merchant | Yes | Must have SoapClient and OpenSSL enabled in PHP 5+ for this gateway to function. |
| First Data (formerly LinkPoint) | merchant | Yes | User cancellations and expirations must ne handled manually by the administrator. |
| InternetSecure | merchant | No | Despite being a merchant account, users are required to complete purchase off-site. |
| NetBilling | merchant | Yes | Must configuration Scriptable Reporting Interface, Control Keyword, and Dynamic Security Code. |
| Offline | offline | No | Accept cheques and money order payments with this. Invoices can be marked as paid in the control panel. Only when an invoice is marked as paid will the order / subscription be active and appear in the control panel and user's account manager. |
| PayPal | 3rd party | Yes | Uses Instant Payment Notification and subscriptions for easy integration. |
| PayPal Pro | Merchant | Yes | Use PayPal Pro like a normal merchant account. Customers pay with their credit cards and never leave your site. |
| PSiGate | merchant | No | Great for Canadian merchants. |
| Sage Pay (formerly Protx) | merchant | No | Great for UK merchants. |
| 2checkout | 3rd party | No | Similar to PayPal. |
Writing Gateway Integrations
Gateway integrations can be simple non-recurring scripts or involved, auto-recurring scripts with multiple callbacks. Below is a list of all functions that are required or available in payment gateway integrations:
- int_[filename]_install
- int_[filename]_update
- int_[filename]_form (argument: gateways array reference)
- Add an array with the following values to the gateways array to list this payment method in checkout:
- name – equivalent to the integration filename
- displayname – the method name to show in the drop-down
- type – either “creditcard”, “creditcard_uk”, or “redirect” (for PayPal and Offline, etc.)
- cctypes (if type is “creditcard” or “creditcard_uk”) – array of accepted credit cards (with the name as the key, display name as the value)
- text (if type is “redirect”) – a string of text to display upon method selection in drop-down
- Add an array with the following values to the gateways array to list this payment method in checkout:
- int_[filename]_validate (argument: gateway class reference)
- The gateway class is passed, but you must run the Create() method to initialize the gateway with the proper name.
- Then, call AddVariables(), AddRequired(), and CheckRequired() in that order to validate the submission.
- int_[filename]_process (argument: gateway class reference)
- To accept the transaction, use the Accepted(message, invoice_id (optional), is_subscription (optional)) method. Passing an invoice¬_id will mark that invoice as paid. Passing is_subscription as TRUE will keep the invoice active and awaiting other auto-recurring payments. invoice_id is required if is_subscription is TRUE.
- To reject, use the Rejected(message) method.
- int_[filename]_callback (optional)
- For 3rd party transactions, the callback is where Accepted() and Rejected() will run.
- int_[filename]_expiring (optional) (argument: array containing data for the subscription expiring as well as key [invoiceid] which is the ID of the invoice linked to the expiring subscription)
- sub includes all package database invoice as well as invoice¬id which is the corresponding active invoice.
- This method is really only for auto-recurring subscriptions that don't have a pushing gateway – we must pull the data from the gateway.
- int_[filename]_cancel (optional) (arguments: array containing keys [invoice] and [id])
- id is the subscription database ID
- invoice is the corresponding invoice.
- This function is for auto-recurring subscriptions only. Manual subscriptions won't even see this button.
