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

Loading…
Cancel
Save