1. Go to this page and download the library: Download ivalrivall/laravel-bca 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/ */
// Request Login dan dapatkan nilai OAUTH
$response = \Bca::httpAuth();
// LIHAT HASIL OUTPUT
echo json_encode($response);
// Nilai token yang dihasilkan saat login
$token = "MvXPqa5bQs5U09Bbn8uejBE79BjI3NNCwXrtMnjdu52heeZmw9oXgB";
//Nomor akun yang akan di ambil informasi saldonya, menggunakan ARRAY
$arrayAccNumber = array('0201245680', '0063001004', '1111111111');
$response = \Bca::getBalanceInfo($token, $arrayAccNumber);
// LIHAT HASIL OUTPUT
echo json_encode($response);
// Nilai token yang dihasilkan saat login
$token = "MvXPqa5bQs5U09Bbn8uejBE79BjI3NNCwXrtMnjdu52heeZmw9oXgB";
$amount = '50000.00';
// Nilai akun bank anda
$nomorakun = '0201245680';
// Nilai akun bank yang akan ditransfer
$nomordestinasi = '0201245681';
// Nomor PO, silahkan sesuaikan
$nomorPO = '12345/PO/2017';
// Nomor Transaksi anda, Silahkan generate sesuai kebutuhan anda
$nomorTransaksiID = '00000001';
$response = \Bca::fundTransfers($token,
$amount,
$nomorakun,
$nomordestinasi,
$nomorPO,
'Testing Saja Ko',
'Online Saja Ko',
$nomorTransaksiID);
echo json_encode($response);
// Nilai token yang dihasilkan saat login
$token = "MvXPqa5bQs5U09Bbn8uejBE79BjI3NNCwXrtMnjdu52heeZmw9oXgB";
// Nilai akun bank anda
$nomorakun = '0201245680';
// Tanggal start transaksi anda
$startdate = '2016-08-29';
// Tanggal akhir transaksi anda
$enddate = '2016-09-01';
$response = \Bca::getAccountStatement($token, $nomorakun, $startdate, $enddate);
echo json_encode($response);
// Nilai token yang dihasilkan saat login
$token = "MvXPqa5bQs5U09Bbn8uejBE79BjI3NNCwXrtMnjdu52heeZmw9oXgB";
$response = \Bca::getDepositRate($token);
echo json_encode($response);
$secret = "NILAI-SECRET-ANDA";
// Nilai token yang dihasilkan saat login
$token = "MvXPqa5bQs5U09Bbn8uejBE79BjI3NNCwXrtMnjdu52heeZmw9oXgB";
$uriSign = "GET:/general/info-bca/atm";
//Format timestamp harus dalam ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSTZD)
$isoTime = "2016-02-03T10:00:00.000+07:00";
$bodyData = array();
//nilai body anda disini
$bodyData['a'] = "BLAAA-BLLLAA";
$bodyData['b'] = "BLEHH-BLLLAA";
//ketentuan BCA array harus disort terlebih dahulu
ksort($bodyData);
$authSignature = \Bca::generateSign($uriSign, $token, $secret, $isoTime, $bodyData);
echo $authSignature;