PHP code example of quetzal-studio / snap-bi-laravel
1. Go to this page and download the library: Download quetzal-studio/snap-bi-laravel 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/ */
quetzal-studio / snap-bi-laravel example snippets
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
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.