Download the PHP package jomweb/billplz without Composer

On this page you can find all versions of the php package jomweb/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...

tests Latest Stable Version Total Downloads License Coverage Status

Installation

Composer

To install through composer by using the following command:

composer require php-http/guzzle7-adapter jomweb/billplz:^4.1

HTTP Adapter

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

PHAR

If Composer isn't available on your application, you can opt for use Billplz PHAR which can be downloaded from the most recent GitHub Release. This build uses guzzlehttp/guzzle under the hood for all request to Billplz API.

You should received billplz.phar file which you can include to your project.

Getting Started

Creating Client

You can start by creating a Billplz client by using the following code (which uses php-http/guzzle6-adapter and php-http/discovery to automatically pick available adapter installed via composer):

You can also send X-Signature key by doing the following:

Alternatively, you could also manually configure Http\Client\Common\HttpMethodsClient directly:

Using Sandbox

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

API Version

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

Usages

Collection

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->uses('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:

List of Collections

You can get Collection index by calling following code:

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

Get existing Collection

You can get existing collection by calling the following code:

Deactivate a collection

To use activate() and deactivate() function, you must explicitely use version v3. You can deactivate a collection by calling the following code:

Activate a collection

You can deactivate a collection by calling the following code:

Open Collection

Now you can create an instance of Collection:

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

Create an Open Collection

List of Open Collections

You can get Open Collection index by calling following code:

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

Get existing Open Collection

You can get existing open collection by calling the following code:

Bill

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->uses('Bill'); to get the same result.

Create a Bill

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

redirect_url can be passed on the 8th parameters which is (array) $optional

Alternative Way to Set Redirect URL

Get existing Bill

Delete a Bill

Payment Completion

Redirect

You can setup a redirect page where user will be redirected after payment is completed. Billplz will redirect user to your specified redirect page along with few URL parameters. In order to capture all the URL parameters, do the following.

If you enabled "Extra Payment Completion information" on your Billplz API Setting, You will receive the following output

Callback

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.

If you enabled "Extra Payment Completion information" on your Billplz API Setting, You will receive the following output

Transaction

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->uses('Bill.Transaction'); to get the same result.

List of Transactions

You can get Transaction index by calling following code:

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

Banking

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->uses('Bank'); to get the same result.

Create A Bank Account

Request Bank Account Direct Verification Service by creating bank records thru this API.

Get A Bank Account

Query Billplz Bank Account Direct Verification Service by passing single account number arguement. This API will only return latest, single matched bank account.

Registration Check by Bank Account

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.

Payment Order Collection

Create an instance of Payment Order Collection:

Create Payment Order Collection

Get Payment Order Collection

Payment Order

Create an instance of Payment Order:

Create Payment Order

Note: You will hit 422, You do not have enough payments error if you are trying to make a payment with total that are exceeding your Payment Order Limit.

Get Payment Order

Get Payment Order Limit

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 >=8.0.0 <8.4.0
jomweb/ringgit Version ^3.0
laravie/codex Version ^6.1
laravie/codex-filter Version ^2.0
php-http/multipart-stream-builder Version ^1.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 jomweb/billplz contains the following files

Loading the files please wait ....