Omnipay 3.x driver for Global Payments
composer require globalpayments/omnipay-globalpayments
This driver handles server-to-server requests for multiple Global Payments payment gateways by connecting to Global Payments' PHP-SDK, which is the key dependency. Currently supported payment gateways are: Heartland/Portico, TransIt, and Merchantware/Genius.
The integration is fairly straight forward. Essentially you just pass
a token
field through instead of (or sometimes in addition to) the regular credit card data.
Start by following the standard Heartland Single-use Tokenization guide here.
After that you will have a payment_token
field which will be submitted to your server.
In the typical Omnipay fashion, simply pass this through to the gateway as token
:
$token = $_POST['payment_token'];
$response = $gateway->purchase([
'amount' => '10.00',
'card' => $formData, // still used for things like cardholder name and address
'currency' => 'USD',
'token' => $token,
])->send();
Our Examples folder contains ready-to-run examples for your reference. We're especially keen to provide notated examples for transactions we support that differ from the basic Omnipay examples.