2017 © Pedro Peláez
 

library billplz

PHP library for BillPlz API, Malaysia's online payment

image

kidino/billplz

PHP library for BillPlz API, Malaysia's online payment

  • Friday, August 19, 2016
  • by kidino
  • Repository
  • 3 Watchers
  • 8 Stars
  • 287 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

PHP BillPlz

This is a simple library for working with Malaysia's BillPlz online payment. Be sure that you read the BillPlz API Documentation and understand what it offers before using this library., (*1)

https://billplz.com/api, (*2)

Installation

Composer

composer require kidino/billplz, (*3)

Github

Just download any of the release or clone this repository. You may need to manage how you load the library with namespacing yourself., (*4)

How to use

Create New Collection

Be sure that you save the result. Result you get the is normal Curl result., (*5)

use Kidino\Billplz\Billplz;

$bplz = new Billplz(array('api_key' => 'your api key'));
$bplz->set_data('title','Home Tutoring');
$bplz->set_data('logo','/xampp/htdocs/billplz/logo.png');
$result = $bplz->create_collection();
list($rheader, $rbody) = explode("\n\n", $result);
$bplz_result = json_decode($rbody);

Create a New Bill

Please note that you can also use set_data() with an array instead of two parameters., (*6)

use Kidino\Billplz\Billplz;

$bplz = new Billplz(array('api_key' => 'your api key'));
$bplz->set_data(array(
    'collection_id' => 'your collection id',
    'email' => 'customer@email.com',
    'mobile' => '60123456789',
    'name' => "Jone Doe",
    'due_at' => "2016-1-1",
    'amount' => 2000, // RM20
    'callback_url' => "http://yourwebsite.com/return_url"
));

$result = $bplz->create_bill();
list($rheader, $rbody) = explode("\n\n", $result);
$bplz_result = json_decode($rbody);

Get Bill Details

use Kidino\Billplz\Billplz;

$bplz = new Billplz(array('api_key' => 'your api key'));
$result = $bplz->get_bill( 'your bill id' );
list($rheader, $rbody) = explode("\n\n", $result);
$bplz_result = json_decode($rbody);

Delete Bill

use Kidino\Billplz\Billplz;

$bplz = new Billplz(array('api_key' => 'your api key'));
$result = $bplz->delete_bill( 'your bill id' );
list($rheader, $rbody) = explode("\n\n", $result);
$bplz_result = json_decode($rbody);

The Versions

19/08 2016

dev-master

9999999-dev https://github.com/kidino/billplz

PHP library for BillPlz API, Malaysia's online payment

  Sources   Download

MIT

by Iszuddin Ismail

api malaysia billplz

02/01 2016

v0.1.1

0.1.1.0 https://github.com/kidino/billplz

PHP library for BillPlz API, Malaysia's online payment

  Sources   Download

MIT

by Iszuddin Ismail

api malaysia billplz

02/01 2016

v0.1

0.1.0.0 https://github.com/kidino/billplz

PHP library for BillPlz API, Malaysia's online payment

  Sources   Download

MIT

by Iszuddin Ismail

api malaysia billplz