gdpa/eways-client

A client for Eways.ir Apis

v7.4 2020-12-13 17:00 UTC

This package is auto-updated.

Last update: 2024-11-15 23:38:38 UTC


README

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.