*** This library is no longer maintained! Its functionality is offered in Global Payments’ current library which can be found here. ***
Heartland driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Heartland support for Omnipay.
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:
{
"require": {
"hps/omnipay-heartland": "dev-master"
}
}
And run composer to update your dependencies:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
The following gateways are provided by this package:
- Heartland’s Portico Gateway API
- Heartland's PayPlan API
For general usage instructions, please see the main Omnipay repository.
The Heartland integration is fairly straight forward. Essentially you just pass
a token
field through to Heartland instead of the regular credit card data.
Start by following the standard Heartland Single-use Tokenization guide here: https://developer.heartlandpaymentsystems.com/documentation/v2/introduction
After that you will have a payment_token
field which will be submitted to your server.
Simply pass this through to the gateway as token
, instead of the usual card
array:
$token = $_POST['payment_token'];
$response = $gateway->purchase([
'amount' => '10.00',
'currency' => 'USD',
'token' => $token,
])->send();
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.