PHP code example of xinyeweb / yii2-asiapay

1. Go to this page and download the library: Download xinyeweb/yii2-asiapay 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/ */

    

xinyeweb / yii2-asiapay example snippets


    $asiaPay = new AsiaPayClient('商戶號');
    //$orderRef, $amount, $successUrl, $failUrl, $cancelUrl, $remark="", $redirect="", $oriCountry="", $destCountry=""
    $asiaPay->requestPay(time(), 10, 'https://www.xinyeweb.com', 'https://www.xinyeweb.com', 'https://www.xinyeweb.com');