PHP code example of vb-payment / chinatrust-vaccount
1. Go to this page and download the library: Download vb-payment/chinatrust-vaccount 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/ */
vb-payment / chinatrust-vaccount example snippets
use VeryBuy\Payment\ChinaTrust\VirtualAccount\VerifyType;
use VeryBuy\Payment\ChinaTrust\VirtualAccount\VirtualAccountBuilder;
$companyId = 99123; // 特店代號
$builder = new VirtualAccountBuilder($companyId, [
'type' => VerifyType::NONE_BASE, // builder 類別
'number' => '123456789', // (14碼)自訂碼 length:9
]);
$vaccount = $builder->make();