Simple API for Eway Payment Gateway

Installs: 4 488

Dependents: 0

Suggesters: 0

Stars: 1

Watchers: 9

Forks: 0

Open Issues: 0

v1.0.0 2013-02-13 23:41 UTC


This library has been deprecated in favour of bluedogtraining/guzzle-eway, which leverages the Guzzle HTTP library.

Simple API for Eway Payment Gateway Build Status

See for more detail on the Eway Payment Gateway.


Installation is done using and


$request = new \Pway\Request(87654321);
$request->ewayTotalAmount     = 1000; // Ten dollars
$request->ewayCardHoldersName = 'Test Account';
$request->ewayCardNumber      = '4444333322221111';
$request->ewayCardExpiryMonth = '12';
$request->ewayCardExpiryYear  = '20';
$request->ewayCVN             = '123';

$response = $request->send();

if ($response->isSuccessful()) {
    echo "Thanks for your payment.";
} else {
    echo "Error: ".$response->getStatus();



__set() and __get allow you to set request data upon the request object, as long as the requests match one of the allowed request fields in the Eway documentation.


$request->ewayCardHoldersName = 'Foo Bar';


__get() allows you to retreive response data returned from the Eway API. The fields that you can fetch match the fields returned in the response XML. If a field is not present, it will simply return null.


echo $response->ewayTrxnError;

Status Codes

getStatus() will return either:

You can check for a successful response with isSuccessful().