diff --git a/README.md b/README.md new file mode 100644 index 0000000..105d00a --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# WHMCS_OPay V1.0.0 +--- + +## 1. 介紹 + + - 提供WHMCS 串接歐付寶金流模組使用, + + +## 2. 安裝環境 + - 需有安裝一個完整的WHMCS 系統 (不相容6.0以前的版本) + + +## 3. 使用教學 + - 使用者文件放置於資料夾內,可供參閱 + + +## 4. 聯絡我們 + - 歐付寶技術客服信箱: techsupport@Opay.tw + + + + +[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax) diff --git "a/allpay \344\275\277\347\224\250\346\211\213\345\206\212.pdf" "b/allpay \344\275\277\347\224\250\346\211\213\345\206\212.pdf" new file mode 100644 index 0000000..a21961f Binary files /dev/null and "b/allpay \344\275\277\347\224\250\346\211\213\345\206\212.pdf" differ diff --git "a/allpay \347\250\213\345\274\217\350\246\217\346\240\274\346\233\270.pdf" "b/allpay \347\250\213\345\274\217\350\246\217\346\240\274\346\233\270.pdf" new file mode 100644 index 0000000..59f9a71 Binary files /dev/null and "b/allpay \347\250\213\345\274\217\350\246\217\346\240\274\346\233\270.pdf" differ diff --git a/modules/gateways/allpay/allpay.php b/modules/gateways/allpay/allpay.php new file mode 100644 index 0000000..829e265 --- /dev/null +++ b/modules/gateways/allpay/allpay.php @@ -0,0 +1,116 @@ + 'aio', + 'EncryptType' => 1 + ); + private $posturl = 'https://payment.allPay.com.tw/Cashier/AioCheckOut/V4'; + public $HashIV; + public $HashKey; + + function __construct($payment) + { + $this->data['ChoosePayment'] = $payment; + $this->data['MerchantTradeDate'] = date('Y/m/d H:i:s'); + } + + function setTestMode() + { + $this->posturl = 'https://payment-stage.allPay.com.tw/Cashier/AioCheckOut/V4'; + $this->MerchantID = '2000132'; + $this->HashKey = '5294y06JbISpM5x9'; + $this->HashIV = 'v77hoKGq4kWxNNIS'; + } + + function __get($key) + { + return $this->data[$key]; + } + + function __set($key, $val) + { + $this->data[$key] = $val; + } + + function GetHTML($btnText='Pay Now') { + $this->data['CheckMacValue'] = CheckMacValue($this->data, $this->HashKey, $this->HashIV); + $form = '
'; + foreach ($this->data as $key => &$val) { + $form .= ''; + } + $form .= '
'; + return $form; + } +} + +class AllPay_Credit +{ + private $data = array(); + private $HashIV; + private $HashKey; + + function __get($key) + { + return $this->data[$key]; + } + + function __set($key, $val) + { + $this->data[$key] = $val; + } + + function Close() { + $this->Action = 'C'; + return $this->Sent(); + } + + function Refund() { + $this->Action = 'R'; + return $this->Sent(); + } + + function Cancel() { + $this->Action = 'E'; + return $this->Sent(); + } + + function GiveUp() { + $this->Action = 'N'; + return $this->Sent(); + } + + private function Sent() + { + $this->CheckMacValue = CheckMacValue($this->data, $this->HashKey, $this->HashIV); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://payment.allpay.com.tw/CreditDetail/DoAction'); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($this->data)); + $res = curl_exec($ch); + curl_close($ch); + parse_str($res, $result); + return $result; + } +} \ No newline at end of file diff --git a/modules/gateways/allpay_atm.php b/modules/gateways/allpay_atm.php new file mode 100644 index 0000000..9372a20 --- /dev/null +++ b/modules/gateways/allpay_atm.php @@ -0,0 +1,125 @@ + '歐付寶 - ATM', + 'APIVersion' => '1.1', // Use API Version 1.1 + 'DisableLocalCredtCardInput' => false, + 'TokenisedStorage' => false, + ); +} + +function allpay_atm_config() { + return array( + 'FriendlyName' => array( + 'Type' => 'System', + 'Value' => 'ATM', + ), + 'MerchantID' => array( + 'FriendlyName' => '會員編號', + 'Type' => 'text', + 'Size' => '7', + 'Default' => '', + 'Description' => '歐付寶會員編號。', + ), + 'HashKey' => array( + 'FriendlyName' => 'HashKey', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'HashIV' => array( + 'FriendlyName' => 'HashIV', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'ExpireDate' => array( + 'FriendlyName' => '繳費有效天數', + 'Type' => 'text', + 'Size' => '3', + 'Default' => '7', + 'Description' => '', + ), + 'InvoicePrefix' => array( + 'FriendlyName' => '帳單前綴', + 'Type' => 'text', + 'Default' => '', + 'Description' => '選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)', + 'Size' => '5', + ), + 'testMode' => array( + 'FriendlyName' => '測試模式', + 'Type' => 'yesno', + 'Description' => '測試模式', + ), + ); +} + +function allpay_atm_link($params) { + + # check if in log + $log = Capsule::table('tblactivitylog') + ->where('description', 'like', 'allpay_atm:{"'.$params['invoiceid'].'":%') + ->orderBy('id', 'desc') + ->first(); + if ($log) { + $log = json_decode(substr($log->description, 11), true); + $log = $log[$params['invoiceid']]; + $BankCode = $log['BankCode']; + $vAccount = $log['vAccount']; + $ExpireDateStr = $log['ExpireDate']; + $ExpireDate = strtotime($ExpireDateStr); + if ($ExpireDate >= date()) { + return '

銀行代碼:'.$BankCode.'

'. + '

帳號:'.chunk_split($vAccount, 4, ' ').'

'. + '

帳號繳費期限:'.$ExpireDateStr.'

'; + } + } + + # Invoice Variables + $TimeStamp = time(); + $TradeNo = $params['InvoicePrefix'].$TimeStamp.$params['invoiceid']; + $amount = $params['amount']; # Format: ##.## + $TotalAmount = round($amount); # Format: ## + + # System Variables + $systemurl = $params['systemurl']; + + # 交易設定 + $ExpireDate = $params['ExpireDate']; + if (!$params['ExpireDate']) { + $ExpireDate = 7; //預設7天 + } + + $transaction = new AllPay_Pay('ATM'); + + # 是否為測試模式 + if ($params['testMode'] == 'on') { + $transaction->setTestMode(); + } else { + $transaction->MerchantID = $params['MerchantID']; + $transaction->HashKey = $params['HashKey']; + $transaction->HashIV = $params['HashIV']; + } + + $transaction->MerchantTradeNo = $TradeNo; + $transaction->TotalAmount = $TotalAmount; + $transaction->TradeDesc = $params['description']; + $transaction->ItemName = $params['description']; + $transaction->ReturnURL = $systemurl.'/modules/gateways/callback/allpay_atm.php'; + $transaction->PaymentInfoURL = $systemurl.'/modules/gateways/callback/allpay_atm_info.php'; + $transaction->ClientBackURL = $params['returnurl']; + $transaction->ExpireDate = $ExpireDate; + + return $transaction->GetHTML($params['langpaynow']); +} diff --git a/modules/gateways/allpay_credit.php b/modules/gateways/allpay_credit.php new file mode 100644 index 0000000..986495f --- /dev/null +++ b/modules/gateways/allpay_credit.php @@ -0,0 +1,114 @@ + '歐付寶 - 信用卡', + 'APIVersion' => '1.1', // Use API Version 1.1 + 'DisableLocalCredtCardInput' => false, + 'TokenisedStorage' => false, + ); +} + +function allpay_credit_config() { + return array( + 'FriendlyName' => array( + 'Type' => 'System', + 'Value' => '信用卡', + ), + 'MerchantID' => array( + 'FriendlyName' => '會員編號', + 'Type' => 'text', + 'Size' => '7', + 'Default' => '', + 'Description' => '歐付寶會員編號。', + ), + 'HashKey' => array( + 'FriendlyName' => 'HashKey', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'HashIV' => array( + 'FriendlyName' => 'HashIV', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'InvoicePrefix' => array( + 'FriendlyName' => '帳單前綴', + 'Type' => 'text', + 'Default' => '', + 'Description' => '選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)', + 'Size' => '5', + ), + 'testMode' => array( + 'FriendlyName' => '測試模式', + 'Type' => 'yesno', + 'Description' => '測試模式', + ), + ); +} + +function allpay_credit_link($params) { + + # Invoice Variables + $TimeStamp = time(); + $TradeNo = $params['InvoicePrefix'].$TimeStamp.$params['invoiceid']; + $amount = $params['amount']; # Format: ##.## + $TotalAmount = round($amount); # Format: ## + + # System Variables + $systemurl = $params['systemurl']; + + $transaction = new AllPay_Pay('Credit'); + + # 是否為測試模式 + if ($params['testMode'] == 'on') { + $transaction->setTestMode(); + } else { + $transaction->MerchantID = $params['MerchantID']; + $transaction->HashKey = $params['HashKey']; + $transaction->HashIV = $params['HashIV']; + } + + $transaction->MerchantTradeNo = $TradeNo; + $transaction->TotalAmount = $TotalAmount; + $transaction->TradeDesc = $params['description']; + $transaction->ItemName = $params['description']; + $transaction->ReturnURL = $systemurl.'/modules/gateways/callback/allpay_credit.php'; + $transaction->ClientBackURL = $params['returnurl']; + + return $transaction->GetHTML($params['langpaynow']); +} + +function allpay_credit_refund($params) { + if ($params['testMode'] == 'on') { + return array( + 'status' => 'error', + 'rawdata' => 'Cannot refund in test mode.', + ); + } + list($MerchantTradeNo, $TradeNo) = explode('-', $params['transid']); + $credit = new AllPay_Credit(); + $credit->MerchantTradeNo = $MerchantTradeNo; + $credit->TradeNo = $TradeNo; + $credit->TotalAmount = $params['amount']; + $credit->HashKey = $params['HashKey']; + $credit->HashIV = $params['HashIV']; + $CloseResult = $credit->Close(); + $RefundResult = $credit->Refund(); + return array( + 'status' => ($RefundResult['RtnCode']==='1')?'success':'declined', + 'rawdata' => $RefundResult, + 'transid' => $RefundResult['TradeNo'], + 'fees' => 0, + ); +} diff --git a/modules/gateways/allpay_cvs.php b/modules/gateways/allpay_cvs.php new file mode 100644 index 0000000..31ff711 --- /dev/null +++ b/modules/gateways/allpay_cvs.php @@ -0,0 +1,125 @@ + '歐付寶 - 超商代碼', + 'APIVersion' => '1.1', // Use API Version 1.1 + 'DisableLocalCredtCardInput' => false, + 'TokenisedStorage' => false, + ); +} + +function allpay_cvs_config() { + return array( + 'FriendlyName' => array( + 'Type' => 'System', + 'Value' => '超商代碼', + ), + 'MerchantID' => array( + 'FriendlyName' => '會員編號', + 'Type' => 'text', + 'Size' => '7', + 'Default' => '', + 'Description' => '歐付寶會員編號。', + ), + 'HashKey' => array( + 'FriendlyName' => 'HashKey', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'HashIV' => array( + 'FriendlyName' => 'HashIV', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'StoreExpireDate' => array( + 'FriendlyName' => '繳費截止時間', + 'Type' => 'text', + 'Size' => '3', + 'Default' => '7', + 'Description' => '≤ 100 為天數,> 100 為分鐘', + ), + 'InvoicePrefix' => array( + 'FriendlyName' => '帳單前綴', + 'Type' => 'text', + 'Default' => '', + 'Description' => '選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)', + 'Size' => '5', + ), + 'testMode' => array( + 'FriendlyName' => '測試模式', + 'Type' => 'yesno', + 'Description' => '測試模式', + ), + ); +} + +function allpay_cvs_link($params) { + + # check if in log + $log = Capsule::table('tblactivitylog') + ->where('description', 'like', 'allpay_cvs:{"'.$params['invoiceid'].'":%') + ->orderBy('id', 'desc') + ->first(); + if ($log) { + $log = json_decode(substr($log->description, 11), true); + $log = $log[$params['invoiceid']]; + $PaymentNo = $log['PaymentNo']; + $ExpireDateStr = $log['ExpireDate']; + $ExpireDate = strtotime($ExpireDateStr); + if ($ExpireDate >= date()) { + return '

繳費代碼:'.$PaymentNo.'

'. + '

代碼繳費期限:'.$ExpireDateStr.'

'; + } + } + + # Invoice Variables + $TimeStamp = time(); + $TradeNo = $params['InvoicePrefix'].$TimeStamp.$params['invoiceid']; + $amount = $params['amount']; # Format: ##.## + $TotalAmount = round($amount); # Format: ## + if ( $TotalAmount < 27 || $TotalAmount > 20000 ) return '此金額無法使用此付款方式。'; + + # System Variables + $systemurl = $params['systemurl']; + + # 交易設定 + $StoreExpireDate = $params['StoreExpireDate']; + if (!$params['StoreExpireDate']) { + $StoreExpireDate = 7; //預設7天 + } + + $transaction = new AllPay_Pay('CVS'); + + # 是否為測試模式 + if ($params['testMode'] == 'on') { + $transaction->setTestMode(); + } else { + $transaction->MerchantID = $params['MerchantID']; + $transaction->HashKey = $params['HashKey']; + $transaction->HashIV = $params['HashIV']; + } + + $transaction->MerchantTradeNo = $TradeNo; + $transaction->TotalAmount = $TotalAmount; + $transaction->TradeDesc = $params['description']; + $transaction->ItemName = $params['description']; + $transaction->ReturnURL = $systemurl.'/modules/gateways/callback/allpay_cvs.php'; + $transaction->PaymentInfoURL = $systemurl.'/modules/gateways/callback/allpay_cvs_info.php'; + $transaction->ClientBackURL = $params['returnurl']; + $transaction->StoreExpireDate = $StoreExpireDate; + $transaction->Desc_1 = $params['description']; + + return $transaction->GetHTML($params['langpaynow']); +} diff --git a/modules/gateways/allpay_tenpay.php b/modules/gateways/allpay_tenpay.php new file mode 100644 index 0000000..cbacbfe --- /dev/null +++ b/modules/gateways/allpay_tenpay.php @@ -0,0 +1,104 @@ + '歐付寶 - 財付通', + 'APIVersion' => '1.1', // Use API Version 1.1 + 'DisableLocalCredtCardInput' => false, + 'TokenisedStorage' => false, + ); +} + +function allpay_tenpay_config() { + return array( + 'FriendlyName' => array( + 'Type' => 'System', + 'Value' => '財付通', + ), + 'MerchantID' => array( + 'FriendlyName' => '會員編號', + 'Type' => 'text', + 'Size' => '7', + 'Default' => '', + 'Description' => '歐付寶會員編號。', + ), + 'HashKey' => array( + 'FriendlyName' => 'HashKey', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'HashIV' => array( + 'FriendlyName' => 'HashIV', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'ExpireTime' => array( + 'FriendlyName' => '付款截止時間', + 'Type' => 'text', + 'Size' => '3', + 'Default' => '72', + 'Description' => '小時 ( ≤ 72 )', + ), + 'InvoicePrefix' => array( + 'FriendlyName' => '帳單前綴', + 'Type' => 'text', + 'Default' => '', + 'Description' => '選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)', + 'Size' => '5', + ), + 'testMode' => array( + 'FriendlyName' => '測試模式', + 'Type' => 'yesno', + 'Description' => '測試模式', + ), + ); +} + +function allpay_tenpay_link($params) { + + # Invoice Variables + $TimeStamp = time(); + $TradeNo = $params['InvoicePrefix'].$TimeStamp.$params['invoiceid']; + $amount = $params['amount']; # Format: ##.## + $TotalAmount = round($amount); # Format: ## + + # System Variables + $systemurl = $params['systemurl']; + + # 交易設定 + if (!(int)$params['ExpireTime']) { + $params['ExpireTime'] = 72; //預設72 + } + $ExpireTime = date('Y/m/d H:i:s', strtotime('+'.$params['ExpireTime'].' hours')); + + $transaction = new AllPay_Pay('Tenpay'); + + # 是否為測試模式 + if ($params['testMode'] == 'on') { + $transaction->setTestMode(); + } else { + $transaction->MerchantID = $params['MerchantID']; + $transaction->HashKey = $params['HashKey']; + $transaction->HashIV = $params['HashIV']; + } + + $transaction->MerchantTradeNo = $TradeNo; + $transaction->TotalAmount = $TotalAmount; + $transaction->TradeDesc = $params['description']; + $transaction->ItemName = $params['description']; + $transaction->ReturnURL = $systemurl.'/modules/gateways/callback/allpay_tenpay.php'; + $transaction->ClientBackURL = $params['returnurl']; + $transaction->ExpireTime = $ExpireTime; + + return $transaction->GetHTML($params['langpaynow']); +} diff --git a/modules/gateways/allpay_topupused.php b/modules/gateways/allpay_topupused.php new file mode 100644 index 0000000..f4e5591 --- /dev/null +++ b/modules/gateways/allpay_topupused.php @@ -0,0 +1,96 @@ + '歐付寶 - 儲值/餘額消費', + 'APIVersion' => '1.1', // Use API Version 1.1 + 'DisableLocalCredtCardInput' => false, + 'TokenisedStorage' => false, + ); +} + +function allpay_topupused_config() { + return array( + 'FriendlyName' => array( + 'Type' => 'System', + 'Value' => '儲值/餘額消費 歐付寶', + ), + 'MerchantID' => array( + 'FriendlyName' => '會員編號', + 'Type' => 'text', + 'Size' => '7', + 'Default' => '', + 'Description' => '歐付寶會員編號。', + ), + 'HashKey' => array( + 'FriendlyName' => 'HashKey', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'HashIV' => array( + 'FriendlyName' => 'HashIV', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'InvoicePrefix' => array( + 'FriendlyName' => '帳單前綴', + 'Type' => 'text', + 'Default' => '', + 'Description' => '選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)', + 'Size' => '5', + ), + 'testMode' => array( + 'FriendlyName' => '測試模式', + 'Type' => 'yesno', + 'Description' => '測試模式', + ), + ); +} + +function allpay_topupused_link($params) { + + # Invoice Variables + $TimeStamp = time(); + $TradeNo = $params['InvoicePrefix'].$TimeStamp.$params['invoiceid']; + $amount = $params['amount']; # Format: ##.## + $TotalAmount = round($amount); # Format: ## + + # System Variables + $systemurl = $params['systemurl']; + + # 交易設定 + $StoreExpireDate = $params['StoreExpireDate']; + if (!$params['StoreExpireDate']) { + $StoreExpireDate = 7; //預設7天 + } + + $transaction = new AllPay_Pay('TopUpUsed'); + + # 是否為測試模式 + if ($params['testMode'] == 'on') { + $transaction->setTestMode(); + } else { + $transaction->MerchantID = $params['MerchantID']; + $transaction->HashKey = $params['HashKey']; + $transaction->HashIV = $params['HashIV']; + } + + $transaction->MerchantTradeNo = $TradeNo; + $transaction->TotalAmount = $TotalAmount; + $transaction->TradeDesc = $params['description']; + $transaction->ItemName = $params['description']; + $transaction->ReturnURL = $systemurl.'/modules/gateways/callback/allpay_topupused.php'; + $transaction->ClientBackURL = $params['returnurl']; + + return $transaction->GetHTML($params['langpaynow']); +} diff --git a/modules/gateways/allpay_webatm.php b/modules/gateways/allpay_webatm.php new file mode 100644 index 0000000..7ba03c6 --- /dev/null +++ b/modules/gateways/allpay_webatm.php @@ -0,0 +1,93 @@ + '歐付寶 - WebATM', + 'APIVersion' => '1.1', // Use API Version 1.1 + 'DisableLocalCredtCardInput' => false, + 'TokenisedStorage' => false, + ); +} + +function allpay_webatm_config() { + return array( + 'FriendlyName' => array( + 'Type' => 'System', + 'Value' => 'WebATM', + ), + 'MerchantID' => array( + 'FriendlyName' => '會員編號', + 'Type' => 'text', + 'Size' => '7', + 'Default' => '', + 'Description' => '歐付寶會員編號。', + ), + 'HashKey' => array( + 'FriendlyName' => 'HashKey', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'HashIV' => array( + 'FriendlyName' => 'HashIV', + 'Type' => 'password', + 'Size' => '16', + 'Default' => '', + 'Description' => '於廠商管理後台->系統開發管理->系統介接設定中取得', + ), + 'InvoicePrefix' => array( + 'FriendlyName' => '帳單前綴', + 'Type' => 'text', + 'Default' => '', + 'Description' => '選填(只能為數字、英文,且與帳單 ID 合併總字數不能超過 20)', + 'Size' => '5', + ), + 'testMode' => array( + 'FriendlyName' => '測試模式', + 'Type' => 'yesno', + 'Description' => '測試模式', + ), + ); +} + +function allpay_webatm_link($params) { + + # detect if mobile + if (isMobile()) return '無法在手機上使用'.$params['FriendlyName'].'。'; + + # Invoice Variables + $TimeStamp = time(); + $TradeNo = $params['InvoicePrefix'].$TimeStamp.$params['invoiceid']; + $amount = $params['amount']; # Format: ##.## + $TotalAmount = round($amount); # Format: ## + + # System Variables + $systemurl = $params['systemurl']; + + $transaction = new AllPay_Pay('WebATM'); + + # 是否為測試模式 + if ($params['testMode'] == 'on') { + $transaction->setTestMode(); + } else { + $transaction->MerchantID = $params['MerchantID']; + $transaction->HashKey = $params['HashKey']; + $transaction->HashIV = $params['HashIV']; + } + + $transaction->MerchantTradeNo = $TradeNo; + $transaction->TotalAmount = $TotalAmount; + $transaction->TradeDesc = $params['description']; + $transaction->ItemName = $params['description']; + $transaction->ReturnURL = $systemurl.'/modules/gateways/callback/allpay_webatm.php'; + $transaction->ClientBackURL = $params['returnurl']; + + return $transaction->GetHTML($params['langpaynow']); +} diff --git a/modules/gateways/callback/allpay_atm.php b/modules/gateways/callback/allpay_atm.php new file mode 100644 index 0000000..eae95c8 --- /dev/null +++ b/modules/gateways/callback/allpay_atm.php @@ -0,0 +1,54 @@ + array( + 'BankCode' => $_POST['BankCode'], + 'vAccount' => $_POST['vAccount'], + 'ExpireDate' => $_POST['ExpireDate'] + ) + ) ); + logActivity('allpay_atm:'.$transactionInfo); + die('1|OK'); +} + +echo '0|', $transactionStatus; diff --git a/modules/gateways/callback/allpay_credit.php b/modules/gateways/callback/allpay_credit.php new file mode 100644 index 0000000..442f109 --- /dev/null +++ b/modules/gateways/callback/allpay_credit.php @@ -0,0 +1,54 @@ + array( + 'PaymentNo' => $_POST['PaymentNo'], + 'ExpireDate' => $_POST['ExpireDate'] + ) + ) ); + logActivity('allpay_cvs:'.$transactionInfo); + die('1|OK'); +} + +echo '0|', $transactionStatus; diff --git a/modules/gateways/callback/allpay_tenpay.php b/modules/gateways/callback/allpay_tenpay.php new file mode 100644 index 0000000..bb58b4d --- /dev/null +++ b/modules/gateways/callback/allpay_tenpay.php @@ -0,0 +1,54 @@ +