eligibor-solution / laravel-payment-bni
Laravel package for BNI eCollection (VA) & QRIS with auditing, granular errors, tests & Postman.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/eligibor-solution/laravel-payment-bni
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.9
- illuminate/contracts: ^11.0 || ^12.0
- illuminate/http: ^11.0 || ^12.0
- illuminate/support: ^11.0 || ^12.0
Requires (Dev)
- orchestra/testbench: ^9.0 || ^10.0 || ^11.0
- phpunit/phpunit: ^11.0 || ^12.0
README
Namespace: ESolution\BNIPayment
Fitur:
- VA: create, update, inquiry
- Webhook payment notification
- Audit trail ke DB (request/response)
- Error handling granular (kode BNI)
- QRIS client (pluggable path)
- DB Config (override config file)
- Mirror billing + reconcile (scheduler)
- Events: BniPaymentReceived, BniBillingPaid, BniBillingExpired
- Unit tests (Orchestra), Postman collection
Install
composer require eligibor-solution/laravel-payment-bni php artisan vendor:publish --provider="ESolution\BNIPayment\BNIPaymentServiceProvider" --tag=bni-config php artisan vendor:publish --provider="ESolution\BNIPayment\BNIPaymentServiceProvider" --tag=bni-migrations php artisan migrate
Example
use ESolution\BNIPayment\Clients\VaClient; $res = app(VaClient::class)->createBilling([ "type" => "createbilling", "client_id" => bni_config('client_id'), "trx_id" => "INV-1", "trx_amount" => "100000", "billing_type" => "c", "customer_name" => "Mr. X" ]);
Inquiry
$res = app(ESolution\BNIPayment\Clients\VaClient::class)->inquiryBilling('INV-1');
Update
$res = app(ESolution\BNIPayment\Clients\VaClient::class)->updateBilling([ "client_id" => bni_config('client_id'), "trx_id" => "INV-1", "trx_amount" => "100000", "customer_name" => "Mr. X", "type" => "updatebilling" ]);
Webhook
POST /bni/va/payment-notification → returns { "status": "000" } and fires BniPaymentReceived.
Reconcile
php artisan bni:reconcile --limit=200
Scheduler default tiap 5 menit (can be configured).
DB Config
php artisan bni:config:set hostname api.bni.test
php artisan bni:config:get hostname
php artisan bni:config:cache