Download the PHP package asiadevmedia/digiflazz-librarys without Composer
On this page you can find all versions of the php package asiadevmedia/digiflazz-librarys. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asiadevmedia/digiflazz-librarys
More information about asiadevmedia/digiflazz-librarys
Files in asiadevmedia/digiflazz-librarys
Package digiflazz-librarys
Short Description Unofficial PHP Library Digiflazz
License MIT
Informations about the package digiflazz-librarys
Digiflazz PHP Library
This library is unofficial Digiflazz API written with PHP.
- Documentation
- Installation
- Usage
- Methods' Signature and Examples
- Balance
- Get Balance
- Price List
- Get Price List
- Deposit
- Create Deposit Ticket
- Transaction
- Create Transaction
- Inquiry Postpaid
- Pay Postpaid
- Inquiry PLN
- Callback
- Get Callback
- Balance
- Exceptions
- InvalidArgumentException
- ApiException
- Contributing
Documentation
For the API documentation, check Digiflazz API Reference.
Installation
Install digiflazz-php-library with composer by following command:
or add it manually in your composer.json file.
Usage
Configure package with your account's secret key obtained from Digiflazz Dashboard.
Methods' Signature and Examples
Balance
Get Balance
Usage example:
Price List
Get Price List
Usage example:
Deposit
Create Deposit Ticket
| Parameters for this method | Name | Required | Description |
|---|---|---|---|
amount_bank |
yes |
The deposit amount | |
bank |
yes |
The name of the destination bank to which your transfer will be made (BRI, BCA, MANDIRI) | |
owner_name |
yes |
The name of the account holder who made the deposit transfer to Digiflazz |
Usage example:
Transaction
Create Transaction
| Parameters for this method | Name | Required | Description |
|---|---|---|---|
buyer_sku_code |
yes |
Product SKU | |
customer_no |
yes |
Customer number | |
ref_id |
yes |
Your unique reference ID |
Usage example:
Inquiry Postpaid
| Parameters for this method | Name | Required | Description |
|---|---|---|---|
buyer_sku_code |
yes |
Product SKU | |
customer_no |
yes |
Customer number | |
ref_id |
yes |
Your unique reference ID |
Usage example:
Pay Postpaid
| Parameters for this method | Name | Required | Description |
|---|---|---|---|
buyer_sku_code |
yes |
Product SKU | |
customer_no |
yes |
Customer number | |
ref_id |
yes |
Your unique reference ID |
Usage example:
Inquiry PLN
| Parameters for this method | Name | Required | Description |
|---|---|---|---|
customer_no |
yes |
Customer number |
Usage example:
Callback
Get Callback
Use this method to get Callback
Use this method to get JSON Callback
Exceptions
InvalidArgumentException
InvalidArgumentException will be thrown if the argument provided by user is not sufficient to create the request.
For example, there are required arguments such as ref_id, customer_no, and buyer_sku_code to create an transaction. If user lacks one or more arguments when attempting to create one, InvalidArgumentException will be thrown.
InvalidArgumentException is derived from PHP's InvalidArgumentException. For more information about this Exception methods and properties, please check PHP Documentation.
ApiException
ApiException wraps up Digiflazz API error. This exception will be thrown if there are errors from Digiflazz API side.
To get exception message:
To get exception HTTP error code:
To get exception Digiflazz API error code:
Contributing
For any requests, bugs, or comments, please open an issue
Installing Packages
Before you start to code, run this command to install all of the required packages. Make sure you have composer installed in your computer
There is a pre-commit hook to run phpcs and phpcbf. Please make sure they passed before making commits/pushes.