Skip to content

gdpa/eways-client

Repository files navigation

Very short description of the package

Latest Version on Packagist Build Status Quality Score Total Downloads

This library make it easy to use eways apis for using GetProducts, RequestPins and GetStatus SOAPs.

Installation

You can install the package via composer:

composer require gdpa/eways-client

Usage

// Order a pin or top up in one shot
$ewaysClient = new EwaysClient('username', 'password');
$ewaysClient->orderPin($transactionId, $productId, $mobile, $quantity, $email, $optional, $refUrl);

// Pay a bill
$ewaysClient = new EwaysClient('username', 'password');
$ewaysClient->payBill($transactionId, $billId, $payId, $optional);

// Check order status in one shot
$ewaysClient = new EwaysClient('username', 'password');
$ewaysClient->getStatus('transactionID', 'requestID');

// Get products
$getProducts = new GetProduct('username');
$getProducts->products();

// Find product by CID
// For example MTN Top Up CID 40
$getProducts = new GetProduct('username');
$product = $getProducts->find(40);

// Call RequestPin
$requestPin = new RequestPin($password);
$requestPin->requestId($requestId)->quantity($quantity)->productType($productId)->mobile($mobile)->email($email)
    ->optional($optional)->refUrl($refUrl)->result();
    
// Get order status
$getStatus = new GetStatus();
$result = $getStatus->transactionId($transactionId)->requestId($requestId)->result();

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email morteza.poussaneh@gmail.com instead of using the issue tracker.

Credits

License

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

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.