2017 © Pedro Peláez
 

library pway

Simple API for Eway Payment Gateway

image

bluedogtraining/pway

Simple API for Eway Payment Gateway

  • Thursday, February 20, 2014
  • by bluedogtraining
  • Repository
  • 11 Watchers
  • 1 Stars
  • 8,676 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

pway

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

Simple API for Eway Payment Gateway Build Status, (*2)

See http://www.eway.com.au/Developer/eway-api/ for more detail on the Eway Payment Gateway., (*3)

Installation

Installation is done using http://getcomposer.org/ and http://packagist.org/., (*4)

Usage

<?php
$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();
}

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., (*5)

Example:, (*6)

$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., (*7)

Example:, (*8)

echo $response->ewayTrxnError;

Status Codes

getStatus() will return either:, (*9)

  • 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()., (*10)

The Versions

20/02 2014

dev-hhvm

dev-hhvm https://github.com/bluedogtraining/pway

Simple API for Eway Payment Gateway

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api curl payments eway australia

18/02 2014

dev-master

9999999-dev https://github.com/bluedogtraining/pway

Simple API for Eway Payment Gateway

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api curl payments eway australia

14/02 2013

v1.0.0

1.0.0.0 https://github.com/bluedogtraining/pway

Simple API for Eway Payment Gateway

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api curl payments eway australia