PHPackages                             tez/omnipay-eway - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. tez/omnipay-eway

ActiveLibrary[Payment Processing](/categories/payments)

tez/omnipay-eway
================

eWay driver for the Omnipay payment processing library

1100PHP

Since Aug 16Pushed 10y ago2 watchersCompare

[ Source](https://github.com/Mihai-P/tez-omnipay-eway)[ Packagist](https://packagist.org/packages/tez/omnipay-eway)[ RSS](/packages/tez-omnipay-eway/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Omnipay: eWay31
===============

[](#omnipay-eway31)

**eWay driver for the Omnipay PHP payment processing library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements eWay support for Omnipay.

Installation
------------

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "tez/omnipay-eway": "~2.0"
    }
}
```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

- Eway\_Rapid31

For general usage instructions, please see the main [Omnipay](https://github.com/Mihai-P/tez-omnipay-eway)repository.

Examples
--------

[](#examples)

```
use Omnipay\Omnipay;

// Create the gateway object and set its parameters
$gateway = Omnipay::create('Eway31_Rapid');
$gateway->setTestMode(true);
$gateway->setApiKey(\Yii::$app->params['eway']['key']);
$gateway->setPassword(\Yii::$app->params['eway']['password']);

// Create a CreditCard object which we intend to validate
// via the gateway
$card = new CreditCard([
    'firstName' => 'Bobby',
    'lastName' => 'Tables',
    'number' => '4444333322221111',
    'cvv' => '123',
    'expiryMonth' => 12,
    'expiryYear' => '2017',
    'email' => 'testEway@biti.ro',
]);

// Use the gateway createCard method to determine if creating
// the card in the eWay gateway is successful.
$response = $gateway->createCard(['card' => $card])->send();
if ($response->isSuccessful()) {
    $tokenCustomerID = $response->getTokenCustomerID();
    echo "We have a token ID";
    // payment was successful: update database
} elseif ($response->isRedirect()) {
    // redirect to offsite payment gateway
    $response->redirect();
    die('error');
} else {
    // payment failed: display message to customer
    print_r($response->getCode());
    print_r($response);
    die('payment failed');
}

// if we got a tokenCustomerId then we can use it for further transactions.
if(! empty($tokenCustomerID)) {

    // Make a second credit card object.
    $card2 = new CreditCard([
        'firstName' => 'Mi',
        'lastName' => 'Pe',
        'number' => '4444333322221111',
        'cvv' => '123',
        'expiryMonth' => 12,
        'expiryYear' => '2016',
        'email' => 'testEway@biti.ro',
    ]);

    // Update the card on the token.
    echo "UPDATE";
    $response = $gateway->updateCard(['cardReference' => $tokenCustomerID, 'card' => $card2])->send();
    print_r($response->getCode());

    // Put through a purchase transaction with the updated card.
    echo "PURCHASE";
    $response = $gateway->purchase(['amount' => '10.00', 'cardReference' => $tokenCustomerID, 'transactonId' => 'Invoice1', 'description' => 'Invoice1 billed', 'currency' => 'AUD'])->send();
    //print_r($response);
    print_r($response->getCode());

    // Make a third credit card object.
    $card3 = new CreditCard([
        'firstName' => 'Mi',
        'lastName' => 'Pe',
        //'cvv' => '123',
    ]);

    // Put through a purchase transaction with the third card.
    echo "PURCHASE";
    $response = $gateway->purchase(['amount' => '10.00', 'cardReference' => $tokenCustomerID, 'transactonId' => 'Invoice1', 'description' => 'Invoice1 billed', 'currency' => 'AUD', 'card' => $card3])->send();
    //print_r($response);
    print_r($response->getCode());
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/07e369e2ec3ce7fc943ee2fb94babc2bc545bfb4b8ae740908fe488931bdc91c?d=identicon)[MihaiP](/maintainers/MihaiP)

---

Top Contributors

[![Mihai-P](https://avatars.githubusercontent.com/u/7947914?v=4)](https://github.com/Mihai-P "Mihai-P (18 commits)")[![delatbabel](https://avatars.githubusercontent.com/u/2335362?v=4)](https://github.com/delatbabel "delatbabel (4 commits)")

### Embed Badge

![Health badge](/badges/tez-omnipay-eway/health.svg)

```
[![Health](https://phpackages.com/badges/tez-omnipay-eway/health.svg)](https://phpackages.com/packages/tez-omnipay-eway)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
