PHP code example of bajjour / billplz-pkg

1. Go to this page and download the library: Download bajjour/billplz-pkg library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bajjour / billplz-pkg example snippets

bash
php artisan vendor:publish --provider="Billplz\BillplzServiceProvider" --tag="billplz-config"
bash
use Billplz\Services\BillplzService;


public function __construct(BillplzService $billplz)
{
    $this->billplz = $billplz;
}
bash
$gateways = $this->billplz->list_gateways();
bash
$response = $this->billplz->createCollection(
    title: 'Campaign {id}',
    callback_url: 'https://example.com/callback'
);
bash
$response = $this->billplz->getCollection('your_collection_id');
bash
$response = $this->billplz->paymentOrderLimit();