PHP code example of kurorido / pilluu-php-sdk

1. Go to this page and download the library: Download kurorido/pilluu-php-sdk 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/ */

    

kurorido / pilluu-php-sdk example snippets


composer 

$callback = new PilluCallback('商戶編號', 'Public Key' , 'SHA2 Key');
$response = $callback->check($payload);

if ($response->body->result === 'success') {
    // 付款成功,官方建議再發 Double Check
}

$testing = true; // 設定環境
$checker = new PilluCheckOrder('商戶編號', 'Public Key' , 'SHA2 Key', $testing);

$response = $checker->doCheck('交易發起時間', '交易金額', '商戶訂單號 tradeid');

if ($response->result === '111') {
    // 付款成功
}