|
@@ -133,6 +133,8 @@ class cmbpay implements IPay
|
|
|
|
|
|
const debug_notify_signurl = 'http://121.43.114.153/mobile/cmbpay_sign.php';
|
|
const debug_notify_signurl = 'http://121.43.114.153/mobile/cmbpay_sign.php';
|
|
const debug_notify_payurl = 'http://121.43.114.153/mobile/cmbpay_notify.php';
|
|
const debug_notify_payurl = 'http://121.43.114.153/mobile/cmbpay_notify.php';
|
|
|
|
+ const debug_app_returl = 'http://121.43.114.153/mobile/index.php';
|
|
|
|
+
|
|
|
|
|
|
static private function pay_notify_url()
|
|
static private function pay_notify_url()
|
|
{
|
|
{
|
|
@@ -144,6 +146,17 @@ class cmbpay implements IPay
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ static private function app_returl()
|
|
|
|
+ {
|
|
|
|
+ if(is_debug()) {
|
|
|
|
+ return self::debug_app_returl;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return self::app_returl;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
static private function sign_notify_url()
|
|
static private function sign_notify_url()
|
|
{
|
|
{
|
|
if(is_debug()) {
|
|
if(is_debug()) {
|
|
@@ -187,7 +200,7 @@ class cmbpay implements IPay
|
|
'MerchantUrl' => self::pay_notify_url(),
|
|
'MerchantUrl' => self::pay_notify_url(),
|
|
'MerchantPara' => $attach,
|
|
'MerchantPara' => $attach,
|
|
'MerchantCode' => $code,
|
|
'MerchantCode' => $code,
|
|
- 'MerchantRetUrl' => self::app_returl,
|
|
|
|
|
|
+ 'MerchantRetUrl' => self::app_returl(),
|
|
'MerchantRetPara' => $attach
|
|
'MerchantRetPara' => $attach
|
|
];
|
|
];
|
|
|
|
|
|
@@ -219,8 +232,8 @@ class cmbpay implements IPay
|
|
'strCono' => $config['CoNo'],
|
|
'strCono' => $config['CoNo'],
|
|
'strBillNo' => $bill_no,
|
|
'strBillNo' => $bill_no,
|
|
'strAmount' => "{$payprice}",
|
|
'strAmount' => "{$payprice}",
|
|
- 'strMerchantPara' => $attach,
|
|
|
|
'strMerchantUrl' => self::pay_notify_url(),
|
|
'strMerchantUrl' => self::pay_notify_url(),
|
|
|
|
+ 'strMerchantPara' => $attach,
|
|
'strPayerID' => "{$user_id}",
|
|
'strPayerID' => "{$user_id}",
|
|
'strPayeeID' => '',
|
|
'strPayeeID' => '',
|
|
'strClientIP' => $_SERVER['REMOTE_ADDR'],
|
|
'strClientIP' => $_SERVER['REMOTE_ADDR'],
|