Skip to content

johandouma/eWay-PHP-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eWay PHP API

This class is designed to make eWay payments very easy. Details about the API can be found on the eWay website

Example usage

The example below utilises the eWay test gateway

require_once __DIR__ . '/eWay/eWay.php';

use Badcow\eWay\eWay;

$eWay = new eWay('REAL_TIME_CVN', TRUE);

$eWay
    ->setCustomerID('87654321')
    ->setCardNumber('4444333322221111')
    ->setCardHoldersName('John Smith')
    ->setPaymentAmount(1.00)
    ->setCardExpiry('08', '09')
    ->setCVN('123')
    ->setCustomerFirstName('Firstname')
    ->setCustomerLastName('Lastname')
    ->setCustomerEmail('name@xyz.com.au')
    ->setCustomerAddress('123 Someplace Street, Somewhere ACT')
    ->setCustomerPostcode('2609')
    ->setCustomerInvoiceReference('INV120394')
    ->setCustomerInvoiceDescription('Testing')
    ->setCustomerTransactionReference('4230')
    ->setOption1('Option Number One')
    ->setOption2('Option Number Two')
    ->setOption3('Option Number Three')
    ;

$eWay->pay();

Each setter method will return the eway class allowing for chaining.

License

This software is free to use and distribute. Please see the license file.

About

A PHP API for interfacing with eWay

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%