|
|
|
@ -7,7 +7,7 @@ use Think\Log;
|
|
|
|
|
|
|
|
|
|
class Sqpay
|
|
|
|
|
{
|
|
|
|
|
// H5 支付 双乾 PaymentType "UNION","ZFBZF"
|
|
|
|
|
// H5 支付 双乾 PaymentType "UNION","ZFBZF" 云闪付
|
|
|
|
|
public function sq_pay($data){
|
|
|
|
|
/* $returnurl = empty($returnurl)?"http://".$_SERVER['HTTP_HOST']:$returnurl;//成功跳转
|
|
|
|
|
|
|
|
|
@ -168,7 +168,7 @@ class Sqpay
|
|
|
|
|
$data['secret'] = 12345678; */
|
|
|
|
|
|
|
|
|
|
$notifyurl = "http://".'api.wmtxkj.com'."/callback.php/Notify/sq_callback";//通知
|
|
|
|
|
$data['NotifyURL'] = $notifyurl;
|
|
|
|
|
$data['NotifyURL'] = $data['NotifyURL'] ? $data['NotifyURL'] : $notifyurl;
|
|
|
|
|
$bankInfo = $this->getbankinfo($data['cardNo']);
|
|
|
|
|
$data['cardType'] = $bankInfo['cardType'] == 'CC' ? 2: 1;
|
|
|
|
|
// pp($bankInfo);
|
|
|
|
@ -210,7 +210,7 @@ class Sqpay
|
|
|
|
|
$bankInfo = $this->getbankinfo($data['cardNo']);
|
|
|
|
|
$data['cardType'] = $bankInfo['cardType'] == 'CC' ? 2: 1;
|
|
|
|
|
|
|
|
|
|
$sign = md5("authMsg=&bankCode={$bankInfo['bank']}&cardNo={$data['cardNo']}&cardType={$data['cardType']}&custName={$data['custName']}&custType={$data['custType']}&idNo={$data['idNo']}&idType=0&merNo={$data['merNo']}&payType=XYPAY&phoneNo={$data['phoneNo']}&reqMsgId={$data['reqMsgId']}&".strtoupper(md5($data['secret'])));
|
|
|
|
|
$sign = md5("authMsg={$data['authMsg']}&bankCode={$bankInfo['bank']}&cardNo={$data['cardNo']}&cardType={$data['cardType']}&custName={$data['custName']}&custType={$data['custType']}&idNo={$data['idNo']}&idType=0&merNo={$data['merNo']}&payType=XYPAY&phoneNo={$data['phoneNo']}&reqMsgId={$data['reqMsgId']}&".strtoupper(md5($data['secret'])));
|
|
|
|
|
$sign = strtoupper($sign);
|
|
|
|
|
$param = array(
|
|
|
|
|
'merNo' => $data['merNo'],
|
|
|
|
@ -229,7 +229,6 @@ class Sqpay
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$ret = curl_post($url, $param);
|
|
|
|
|
pp($ret);
|
|
|
|
|
return json_decode($ret, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|