softcommerce / omnipay-paytrace
PayTrace gateway for the Omnipay payment processing library
Installs: 44 004
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 10
Open Issues: 2
Requires
- omnipay/common: ~2.0
Requires (Dev)
- omnipay/tests: ~2.0
This package is not auto-updated.
Last update: 2022-11-22 13:41:41 UTC
README
PayTrace 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 PayTrace support for Omnipay.
This package require PHP 5.4+
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:
{ "require": { "softcommerce/omnipay-paytrace": "~1.0" } }
And run composer to update your dependencies:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
Basic Usage
The following gateways are provided by this package:
- Paytrace_CreditCard
- Paytrace_Check
Usage Example:
$ccGateway = \Omnipay\Omnipay::create('Paytrace_CreditCard'); $ccGateway->setUserName('demo123') ->setPassword('demo123') ->setTestMode(true); $creditCardData = ['number' => '4242424242424242', 'expiryMonth' => '6', 'expiryYear' => '2016', 'cvv' => '123']; $response = $ccGateway->purchase(['amount' => '10.00', 'currency' => 'USD', 'card' => $creditCardData])->send(); if ($response->isSuccessful()) { // SUCCESS echo $response->getMessage(); } else { // FAIL echo $response->getMessage(); } $chGateWay = \Omnipay\Omnipay::create('Paytrace_Check'); $chGateway->setUserName('demo123') ->setPassword('demo123') ->setTestMode(true); $checkData = ['routingNumber' => '325070760', 'bankAccount' => '1234567890', 'name' => 'John Doe']; $response = $chGateway->purchase(['amount' => '10.00', 'currency' => 'USD', 'check' => $checkData])->send(); if ($response->isSuccessful()) { // SUCCESS echo $response->getMessage(); } else { // FAIL echo $response->getMessage(); }
For general usage instructions, please see the main Omnipay repository.
Support
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.