2017 © Pedro Peláez
 

library omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

image

rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  • Tuesday, July 24, 2018
  • by rotassator
  • Repository
  • 3 Watchers
  • 3 Stars
  • 717 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 23 Versions
  • 7 % Grown

The README.md

Omnipay: PayWay REST API

WestPac PayWay REST API driver for the Omnipay PHP payment processing library, (*1)

Latest Stable Version Total Downloads License, (*2)

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements PayWay REST API support for Omnipay., (*3)

This module aims to implement a usable subset of the PayWay REST API (a product of Westpac Bank). The API is extensive, so the initial aim is to implement the following features:, (*4)

  • Create and maintain customers
  • Create single-use tokens (Credit Card, Bank Account)
  • Take payments using tokenised credit card details (aiding PCI compliance)
  • Schedule regular payments

These initial features have now been implemented., (*5)

See the official PayWay documentation for full details., (*6)

Installation

Install the module using composer., (*7)

composer require rotassator/omnipay-payway-restapi

Usage

Take Payment

To take a one-time credit card payment., (*8)

<?php

include 'vendor/autoload.php';

use Exception;
use Omnipay\Common\CreditCard;
use Omnipay\Omnipay;

$gateway = Omnipay::create('PaywayRest_DirectDebit');

$gateway->setApiKeyPublic('REPLACE');
$gateway->setApiKeySecret('REPLACE');
$gateway->setMerchantId('REPLACE');
$gateway->setTestMode(true);

try {
    $response = $gateway->createSingleUseCardToken([
        'card' => new CreditCard([
            'firstName' => 'First Name',
            'lastName' => 'Last Name',
            'number' => '4564710000000004',
            'expiryMonth' => '02',
            'expiryYear' => '2019',
            'cvv' => '847',
        ]),
    ])->send();

    $singleUseTokenId = $response->getData('singleUseTokenId');

    if (empty($singleUseTokenId)) {
        // handle error
    }

    $request = $gateway->purchase([
        'singleUseTokenId' => $singleUseTokenId,
        'customerNumber' => 'AB1245',
        'principalAmount' => '10.00',
        'currency' => 'AUD',
        'orderNumber' => 12,
    ]);

    $response = $request->send();

    if ($response->isSuccessful()) {
        // update order
    }
} catch (Exception $e) {
    // handle error
}

// Example for creating single-use token with Bank Account
$response = $gateway->createSingleUseBankToken([
    'bankAccountBsb' => '999999',
    'bankAccountNumber' => '999999999',
    'bankAccountName' => 'Your Name',
])->send();

$singleUseTokenId = $response->getData('singleUseTokenId');

Known Issue

[curl] 60: SSL certificate problem: unable to get local issuer certificate., (*9)

Solution

Download CA certificate and place somewhere in your project root., (*10)

eg. project/certificate/cacert.pem, (*11)

In the gateway initialization object do like below., (*12)

$gateway = Omnipay::create('PaywayRest_DirectDebit');

$gateway->setApiKeyPublic('REPLACE');
$gateway->setApiKeySecret('REPLACE');
$gateway->setMerchantId('REPLACE');
$gateway->setTestMode(true);

$gateway->setSSLCertificatePath('path/cacert.pem');

Contributing

Contributions are welcome and will be fully credited., (*13)

Contributions can be made via a pull request on Github., (*14)

Support

If you are having general issues with the package, feel free to report it to us., (*15)

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request., (*16)

The Versions

24/07 2018

dev-master

9999999-dev https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

24/07 2018

dev-develop

dev-develop https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

24/07 2018

1.8.0

1.8.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

16/10 2017

1.7.0

1.7.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

21/07 2017

1.6.0

1.6.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

17/05 2017

1.5.1

1.5.1.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

09/02 2017

1.5.0

1.5.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

23/01 2017

1.4.0

1.4.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

07/01 2017

1.3.3

1.3.3.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

07/01 2017

1.3.2

1.3.2.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

06/01 2017

1.3.1

1.3.1.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

06/01 2017

1.3.0

1.3.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

05/01 2017

1.2.0

1.2.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

22/12 2016

1.1.3

1.1.3.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

22/12 2016

1.1.2

1.1.2.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

19/12 2016

1.1.1

1.1.1.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

19/12 2016

1.1.0

1.1.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

18/12 2016

1.0.2

1.0.2.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

18/12 2016

1.0.1

1.0.1.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

14/12 2016

1.0

1.0.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

24/11 2016

dev-feature/refunds

dev-feature/refunds https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

23/11 2016

0.1

0.1.0.0 https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac

23/11 2016

dev-feature/first-principles

dev-feature/first-principles https://github.com/rotassator/omnipay-payway-restapi

PayWay REST API gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steve Dixon

payment pay gateway merchant purchase omnipay token payway westpac