quetzal-studio / snap-bi-laravel
SNAP BI package for Laravel
v0.0.6
2024-08-02 02:12 UTC
Requires
- php: ^8.0
- illuminate/http: ^9.0|^10.0
- illuminate/log: ^9.0|^10.0
- illuminate/support: ^9.0|^10.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.0
- orchestra/testbench: ^7.0|^8.0
- phpseclib/phpseclib: ~3.0
- phpunit/phpunit: ^9.3
README
Laravel package for use SNAP BI API
Features
- Get Access Token
- Intrabank Transfer
- ...
Example Usage
use QuetzalStudio\SnapBi\Amount; use QuetzalStudio\SnapBi\Config; use QuetzalStudio\SnapBi\IntrabankTransfer\Payload; use QuetzalStudio\SnapBi\IntrabankTransfer\Transfer; Config::load('bca'); $request = new Transfer( origin: config('app.url'), channelId: config('snap.providers.bca.channel_id'), externalId: 'YOUR EXTERNAL ID', ); $response = $request->send(new Payload( partnerReferenceNo: 'TRX123', amount: new Amount(10000), beneficiaryAccountNo: '111111', sourceAccountNo: '999999', transactionDate: date(DATE_ATOM, time()), beneficiaryEmail: '', remark: '', currency: 'IDR', additionalInfo: [ 'economicActivity' => '', 'transactionPurpose' => '', ], )); // $response --> \Illuminate\Http\Client\Response