sq yee callback

master
tping 5 years ago
parent fe8d6fe592
commit b22a0c0571

@ -476,12 +476,16 @@ class NotifyController extends BaseController
Log::write(serialize($_REQUEST), Log::DEBUG);
$payData = $this->getPayConfByIdentifier($merNo);
if ($payData['code'] != 0) {
$this->record_logs($payData['msg']);
$merchant = M('payment_merchant', 'tab_')->where([
'identifier' => $merNo
])->find();
if (!$merchant) {
$this->record_logs("找不到商户!".$notify['auth_app_id']);
echo 'fail';
exit();
}
$payConf = $payData['data'];
$payConf = json_decode($merchant['config'], true);
$secret = strtoupper(md5($payConf['secret']));//支付秘钥
// 参与校验
$sign = strtoupper(md5("Amount={$amount}&BillNo={$billNo}&MerNo={$merNo}&Succeed={$succed}&{$secret}"));
@ -890,12 +894,16 @@ class NotifyController extends BaseController
if (substr($identifier, 0, 4) == "OPR:") {
$identifier = substr($identifier, 4);
}
$payData = $this->getPayConfByIdentifier($identifier);
if ($payData['code'] != 0) {
$this->record_logs($payData['msg']);
$merchant = M('payment_merchant', 'tab_')->where([
'identifier' => $identifier
])->find();
if (!$merchant) {
$this->record_logs("找不到商户!".$notify['auth_app_id']);
echo 'fail';
exit();
}
$payConf = $payData['data'];
$payConf = json_decode($merchant['config'], true);
$private_key = $payConf['private_key'];
$yop_public_key = $payConf['public_key'];

Loading…
Cancel
Save