Code Monkey home page Code Monkey logo

bingpayapi's Introduction

Usage

Download the repo, head over to index.php and edit the addPrivateKey() by adding your key.. thats all for installation.

Example code

To check balance of your account, you can use the following code:

// make sure to call the class Bingpay
$bingpay = new BingPay();

$bingpay->getBalance()->data->balance;

Airtime Class

// Get all networks
 var_dump($bingpay->fetchAllNetwork());
// returns an array of all networks
// you can loop through the arrays from the data property
foreach($bingpay->fetchAllNetwork()->data as $data){
    echo 'Network Provider: '.$data->name;
    echo '<br>';
    echo 'Network Note: '.$data->note;
    echo '<br>';
}
// Purchase Airtime
$bingpay->purchaseAirtime('08733', 100, 1)->message;
// returns a message
// Verify Phone Number
$bingpay->verifyNumber('08733', 100)->message;
// returns a message

Bank Class

// Get all banks
$bingpay->fetchAllBanks();
// returns an array of all banks
// resolve bank
$bingpay->resolveBank(214, 7412636015)->message;
// returns a message

Data class

// Get all data plans
$bingpay->getAllDataPlan();
// returns an array of all data plans
// Get data plan of a network
$bingpay->getDataPlan(1);
// returns an array of data plan
// Purchase data
$bingpay->buyData('082', 100, 1);
// returns a message

Trade class

//Convert airtime to cash
$bingpay->airtimeToCash(100, 1, '081')->message;
// returns a message
// Get network fee
$bingpay->getNetworkFee(100, 1)->message;
// returns a message

Utility class

$bingpay->getAllService();
// returns an array of all services
// Get service of a network
$bingpay->getSingleService(1);
// returns an array of service
$bingpay->verifyCustomer(1,1,'prepaid')->message;
// returns a message
$bingpay->purchaseBill(1,1,2,1)->message;
// returns a message

Verify class

// Verify BVN number
$bingpay->verifyBVN('john', 'dod', '0811', '8393')->message;
// returns a message

bingpayapi's People

Contributors

devprecious avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.