Skip to content

TaiwanPay/CHBPayment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHBPayment

Build Status codecov

Payment library for CHB bank in Taiwan. It use simply web api for CHB bank.

Install

$ composer require taiwan-pay/chb-payment

Usage

  • 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.

License

MIT