PHP code example of bluedogtraining / guzzle-eway

1. Go to this page and download the library: Download bluedogtraining/guzzle-eway library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bluedogtraining / guzzle-eway example snippets


$client = \Bdt\Eway\EwayClient::factory();

$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