2017 © Pedro Peláez
 

library eway-rapid-php

eWAY Rapid PHP library

image

eway/eway-rapid-php

eWAY Rapid PHP library

  • Monday, September 12, 2016
  • by eway
  • Repository
  • 7 Watchers
  • 8 Stars
  • 44,247 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 12 Forks
  • 3 Open issues
  • 16 Versions
  • 18 % Grown

The README.md

Eway Rapid PHP Library

Github Workflows ![Latest Version on Packagist][ico-version] Software License, (*1)

A PHP library to integrate with Eway's Rapid Payment API., (*2)

Sign up with Eway at: - Australia: https://www.eway.com.au/ - New Zealand: https://eway.io/nz/ - UK: https://eway.io/uk/ - Hong Kong: https://eway.io/hk/ - Malaysia: https://eway.io/my/, (*3)

For testing, get a free Eway Partner account: https://www.eway.com.au/partner-program/, (*4)

Install

This library requires PHP version 7.4.0 or greater, with the curl, json and openssl extensions., (*5)

Using Composer

The Eway PHP SDK can be install via Composer - this is the recommended method, (*6)

$ composer require eway/eway-rapid-php

Then use Composer's autoload to include the library:, (*7)

require_once 'vendor/autoload.php';

Manual

The Eway PHP SDK can also be downloaded and added without Composer:, (*8)

  1. Download the latest zip (or git clone this repository)
  2. Unzip the zip into your project - for example into a lib directory
  3. Include the Eway SDK:
require_once 'lib/eway-rapid-php-master/include_eway.php';

Usage

See the Eway Rapid API Reference for usage details., (*9)

A simple Direct payment:, (*10)

require('vendor/autoload.php');

$apiKey = 'YOUR-API-KEY';
$apiPassword = 'YOUR-API-PASSWORD';
$apiEndpoint = \Eway\Rapid\Client::MODE_SANDBOX;
$client = \Eway\Rapid::createClient($apiKey, $apiPassword, $apiEndpoint);

$transaction = [
    'Customer' => [
        'CardDetails' => [
            'Name' => 'John Smith',
            'Number' => '4444333322221111',
            'ExpiryMonth' => '12',
            'ExpiryYear' => '25',
            'CVN' => '123',
        ]
    ],
    'Payment' => [
        'TotalAmount' => 1000,
    ],
    'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE,
];

$response = $client->createTransaction(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction);
if ($response->TransactionStatus) {
    echo 'Payment successful! ID: '.$response->TransactionID;
}

Change log

Please see CHANGELOG for more information what has changed recently., (*11)

Testing

Tests are written with PHPUnit. They can be run using Composer:, (*12)

$ composer run test-unit # Run unit tests
$ composer run test-integration # Run integration tests

This library follows PSR2 coding standards, run this command to check:, (*13)

$ composer run phpcs

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

12/09 2016

dev-master

9999999-dev https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

12/09 2016

v1.3.4

1.3.4.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

01/08 2016

v1.3.3

1.3.3.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

01/08 2016

v1.3.2

1.3.2.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

10/06 2016

v1.3.1

1.3.1.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

06/04 2016

v1.3.0

1.3.0.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

22/02 2016

v1.2.3

1.2.3.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

22/02 2016

v1.2.2

1.2.2.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

19/01 2016

v1.2.1

1.2.1.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

09/12 2015

v1.2.0

1.2.0.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

02/12 2015

v1.1.3

1.1.3.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

01/12 2015

v1.1.2

1.1.2.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

28/10 2015

v1.1.1

1.1.1.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

19/10 2015

1.0.2.x-dev

1.0.2.9999999-dev https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

07/10 2015

1.0.1

1.0.1.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires

payments payment processing eway rapid

11/08 2015

v1.0.0

1.0.0.0 https://www.eway.com.au

eWAY Rapid PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *

 

The Development Requires