A PHP 5.3+ Guzzle client for interacting with the Eway Direct Transaction API.
Via composer
{
"require": {
"bluedogtraining/guzzle-eway": "3.*"
}
}
$client = \Bdt\Eway\EwayClient::factory();
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
$ phpunit