Download the PHP package nasrulhazim/billplz without Composer

On this page you can find all versions of the php package nasrulhazim/billplz. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package billplz

PHP framework agnostic library for working with BillPlz API v3 and beyond...

Build Status Latest Stable Version Total Downloads License

Installation

To install through composer, simply put the following in your composer.json file:

HTTP Adapter

Instead of utilizing php-http/guzzle6-adapter you might want to use any other adapter that implements php-http/client-implementation. Check Clients & Adapters for PHP-HTTP.

Usages

Creating Billplz Client

You can start by creating a Billplz client by using the following code (which uses php-http/guzzle6-adapter):

You could also use php-http/discovery to automatically pick available adapter installed via composer:

Using Sandbox

You can set to use development/sandbox environment by adding the following code:

Using different API Version

By default jomweb/billplz would use v3 API version for any request, however you can customize this in future when new API version is available.

Creating Collection Request

Now you can create an instance of Collection:

You can also manually set the API version by doing $billplz->collection('v3');. You can also use $billplz->resource('Collection'); to get the same result.

Create a Collection

You can add a new collection by calling the following code:

You can also create new collection with optional parameters:

Create an Open Collection

Creating Bill Request

Now you can create an instance of Bill:

You can also manually set the API version by doing $billplz->bill('v3');. You can also use $billplz->resource('Bill'); to get the same result.

Create a Bill

You can add a new bill by calling the following code:

Payment Completion

You can setup a webhook to receive POST request from Billplz. In order to accept the response all you to do is write the following.

Get a Bill

Delete a Bill

Creating Transaction Request

Now you can create an instance of Transaction:

You can also manually set the API version by doing $billplz->transaction('v3');. You can also use $billplz->resource('Bill.Transaction'); to get the same result.

Get Transaction Index

You can get Transaction index by calling following code:

You also can provide optional parameters (page, status):

Creating Bank Request

Now you can create an instance of Bank:

You can also manually set the API version by doing $billplz->bank('v3');. You can also use $billplz->resource('Bank'); to get the same result.

Check Bank Account Registration Status

At any given time, you can request to check on a registration status by bank account number.

Get FPX Banks List

If you want to use Bank Direct Feature in Billplz, you need list of FPX Banks to send in create bill request.

You can get supported bank for FPX by calling following code:

Note: You will hit 401, Invalid access error if you have not enabled Bank Direct by Billplz. Contact Billplz for information.

Handling Response

Every request made to Billplz would return \Laravie\Codex\Response which can fallback to \Psr\Http\Message\ResponseInterface which would allow developer to further inspect the response.

Getting the Response

You can get the raw response using the following:

However we also create a method to parse the return JSON string to array.

Checking the Response HTTP Status

You can get the response status code via:

Checking the Response Header

You can also check the response header via the following code:


All versions of billplz with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
laravie/codex Version ~1.0
php-http/multipart-stream-builder Version ^1.0
moneyphp/money Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nasrulhazim/billplz contains the following files

Loading the files please wait ....