Payment library for CHB bank in Taiwan. It use simply web api for CHB bank.
$ composer require taiwan-pay/chb-payment
- initiate the payment
use TaiwanPay\CHBPayment;
$payment = new CHBPayment([
'macKey' => $macKey,
'key' => $key,
'merID' => $merID,
'MerchantID' => $MerchantID,
'TerminalID' => $TerminalID,
'MerchantName' => $MerchantName
], false);
- authenticate an order
// get auth data and render form by yourself
$payment->auth($orderNumber, $amount, $type, $resUrl, $createTime, false);
// get auth form and render it
$payment->auth($orderNumber, $amount, $type, $resUrl, $createTime, true);
- search an order
// get search data and render form by yourself
$payment->search($orderNumber, $amount, $resUrl, false);
// get search form and render it
$payment->search($orderNumber, $amount, $resUrl, true);
Note: All the response will be
POST
to$resUrl
from bank.
MIT