Download the PHP package bluedogtraining/pway without Composer
On this page you can find all versions of the php package bluedogtraining/pway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bluedogtraining/pway
More information about bluedogtraining/pway
Files in bluedogtraining/pway
Package pway
Short Description Simple API for Eway Payment Gateway
License MIT
Homepage https://github.com/bluedogtraining/pway
Informations about the package pway
pway
This library has been deprecated in favour of
bluedogtraining/guzzle-eway
, which leverages the Guzzle HTTP library.
Simple API for Eway Payment Gateway
See http://www.eway.com.au/Developer/eway-api/ for more detail on the Eway Payment Gateway.
Installation
Installation is done using http://getcomposer.org/ and http://packagist.org/.
Usage
Magic
Request
__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.
Example:
$request->ewayCardHoldersName = 'Foo Bar';
Response
__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
.
Example:
echo $response->ewayTrxnError;
Status Codes
getStatus()
will return either:
- a [http://curl.haxx.se/libcurl/c/libcurl-errors.html](cURL error code)
offset by 1000 (ie.
CURLE_UNSUPPORTED_PROTOCOL
would return 1001). - an XML error (
const ERROR_XML = 2000
) - the error code returned from the Eway API.
- or (
const STATUS_OKAY = 1
)
You can check for a successful response with isSuccessful()
.