2017 © Pedro Peláez
 

library onerecharge-php

Onerecharge agents integration php library

image

onerecharge/onerecharge-php

Onerecharge agents integration php library

  • Wednesday, October 19, 2016
  • by segsalerty
  • Repository
  • 1 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Onerecharge PHP client library for Agent's integration for bill payments

Features

  • Get an Authorization token (Retrieve API ACCESS KEY from your agent dashboard)
  • Get supported bill payment
  • Initiate instant recharge/topup (Airtime)
  • Initiate scheduled recharge/topup (Airtime)
  • Cancel a scheduled bill payment
  • Get your Agent account profile summary in one

Examples

  • Initiate an instant recharge/topup (Airtime)
    use Onerecharge\Agent;
    use Onerecharge\Util;
    use Onerecharge\BillPayment;

    //use the Util function like this to get array of supported telco names:
    echo Util::getSupportedBillType();
    //then get an Authorization token. you should store the retrieved token somewhere in your code.
    //tokens can be destroyed from your admin portal anytime (do not store your agent_id and password in your code.)
    $token = Agent::getToken($agent_id, $password);

    $agent = new Agent(API_ACCESS_KEY, $token);
    $billpayment = new BillPayment($agent);
    echo $billpayment->airtimeTopup("08025***373", "Etisalat", 100);

Installing onerecharge-php

The recommended way to install onerecharge-php is through Composer., (*1)

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Guzzle:, (*2)

php composer.phar require onerecharge/onerecharge-php

After installing, you need to require Composer's autoloader:, (*3)

require 'vendor/autoload.php';

You can then later update onerecharge-php using composer:, (*4)

bash composer.phar update, (*5)

The Versions

19/10 2016

dev-master

9999999-dev

Onerecharge agents integration php library

  Sources   Download

ISC

The Requires

 

The Development Requires