CartThrob 9 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

Payments

Overview

A payment gateway is a company that is used as a middleman to capture payments from your customer before being deposited to your bank account. The payments settings is where you will configure your payment gateway and get details about your specific gateway configuration.

Included Gateways

The following payment gateways are included with CartThrob:

Gateway Description
Authorize.net API Accepts card payments through Authorize.net Accept.js and supports authorize-only or authorize-and-capture transactions.
Dummy Gateway Test gateway for development checkout flows without sending transactions to a real processor.
Mollie Offsite Mollie checkout for hosted payment methods using Mollie API credentials and locale settings.
Offline Payments Records orders for payments handled outside an online processor, such as phone, invoice, or manual payment workflows.
Opayo Europe Direct Direct Opayo/Sage Pay card processing using the merchant vendor name and mode settings.
Opayo Europe Offsite (Server) Redirects customers to Opayo-hosted payment pages and receives payment updates through the offsite callback flow.
PayPal Advanced PayPal checkout with customizable card fields using PayPal API credentials.
PayPal Standard PayPal button checkout with optional PayPal Credit, credit card, Venmo, MyBank, Bancontact, and EPS funding sources.
Stripe (Card Element) Stripe card checkout using Stripe.js / Elements, with authorize/capture, refund, token, and void support.
Stripe (Payment Element) Stripe Payment Element checkout for cards, Apple Pay, Google Pay, and other enabled Stripe payment methods.

Custom Gateway Development

To build your own payment gateway, start with the Payment Gateway Plugin API in these docs. It covers the current CartThrob 9.x PaymentPlugin API, TransactionState return values, checkout fields, and optional refund/token/offsite interfaces.

CartThrob also maintains a Git repository of sample gateways and a GitHub Wiki with additional examples. Use those as supplements after reading the local API guide.

Paid gateway development services are available. Please contact us for more details and to confirm pricing and timeline. Before beginning custom development we will need the following:

  1. Developer documentation
  2. Testing credentials for the Payment Gateway

Gateway Configuration

Select a Gateway

There are 2 dropdowns. One is for setting the primary gateway to be used in transactions. If no gateway is specified, this is the gateway that will be used.

The second dropdown is used to select a gateway to configure. You can select multiple gateways and configure them before submitting your changes to be saved.

Gateway Settings

Each gateway has different settings specific to the gateway. These settings are documented individually. The only common setting is the HTML Template. Each gateway can automatically output all of its required HTML in the checkout form. If you would like to override the default HTML and choose your own template, you can set that template here. Beneath the gateway settings, you can find a sample of the HTML that is output in the checkout form to use as a basis for creating your own template.

Payment Security Settings

It’s best to allow as little possibility for someone to exploit your system as you can. This section does a few important things.

Validate Credit Card Number

If you are capturing credit card number, CartThrob can do a Luhn Check (Modulus 10 check) on the credit card before sending it on to your gateway. All gateways do this check, as well as additional checks, so this may not be needed.

Allow Gateway Selection in Checkout Form

If you want your customer to be able to choose gateways, then this should be set to “Yes”. If that’s the case, use the gateway_select tag in the checkout form. This will output a select box containing all available gateways to choose from. If you set the above setting to “Yes” any checked gateways will be selectable by the customer using the gateway select tag. Please note that at this time, the Stripe payment gateway and Authorize.net API gateway are incompatible due to conflicting javascript. Only one of those gateways can currently be configured to work with multiple gateway selections.