PHP code example of hughes / spgateway-core
1. Go to this page and download the library: Download hughes/spgateway-core 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/ */
hughes / spgateway-core example snippets
use VeryBuy\Payment\Spgateway\Core\ResponseVerifier;
$response = (new ResponseVerifier)->customer({response json string});
$response->isSuccess(); // 回應是否成功
$response->isCvs(); // 回應是否為超商代碼
$response->getCvsCode(); // 取得超商代碼
$response->getExpiredAt(); // 繳費到期時間
$response->getAmount(); // 付款金額
$response->getOrderNumber(); // 訂單編號
$response->getId(); // 智付通自訂 id
use VeryBuy\Payment\Spgateway\Core\ResponseVerifier;
$response = (new ResponseVerifier)->notify({response json string});
$response->isSuccess(); // 回應是否成功
$response->isCvs(); // 回應是否為超商代碼
$response->getCvsCode(); // 取得超商代碼
$response->getPaidAt(); // 繳費到期時間
$response->getAmount(); // 付款金額
$response->getOrderNumber(); // 訂單編號
$response->getId(); // 智付通自訂 id