bluedogtraining / guzzle-eway
A Guzzle client for interacting with the Eway Direct Transactions API
Installs: 529
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 10
Forks: 1
Open Issues: 0
pkg:composer/bluedogtraining/guzzle-eway
Requires
Requires (Dev)
This package is not auto-updated.
Last update: 2021-07-09 01:02:48 UTC
README
A PHP 5.3+ Guzzle client for interacting with the Eway Direct Transaction API.
Install
Via composer
{ "require": { "bluedogtraining/guzzle-eway": "3.*" } }
Usage
Create API client
$client = \Bdt\Eway\EwayClient::factory();
Send Payment
Command arguments are as defined in the Eway API,
except without the eway
prefix.
$response = $client->SendPayment([ 'customerID' => '87654321', 'totalAmount' => '10', 'cardHoldersName' => 'Foo Bar', 'cardNumber' => '4444333322221111', 'cardExpiryMonth' => '06', 'cardExpiryYear' => '20', 'CVN' => '123', ]); $response['trxnStatus']; // true $response['trxnError']['code']; // 10
Testing
$ phpunit