From 0d0e3b252513b85f5fc8974e9480143a41bf62df Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Sat, 10 Jun 2023 19:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/Payment/NotifyController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Controller/Payment/NotifyController.php b/app/Controller/Payment/NotifyController.php index 69f10bb..3a34755 100644 --- a/app/Controller/Payment/NotifyController.php +++ b/app/Controller/Payment/NotifyController.php @@ -32,6 +32,8 @@ class NotifyController extends AbstractController Log::info('paymentNotifyToOut params:', $params); $sign = $request->getHeader('x-efps-sign'); $data = json_encode($params); + $data = '{"amount":5000,"procedureFee":23,"payerInfo":{"bankCode":"ICBC","cardType":"D","payerName":"\u9c8d\u4e91\u8f89","cardNo":"621226*********3143"},"payTime":"20230610180818","outTradeNo":"2023061018080300001","transactionNo":"32202306102881341174762","cashAmount":5000,"customerCode":"562276004021027","payState":"00","payerAmount":5000,"channelOrder":"2023061016326911986931600110901","nonceStr":"bda108e1ed1947f488be4b3b23bb6562"}'; + $sign = unserialize('a:1:{i:0;s:344:"KKfrhc/4YNJFuphVMe8yo4sT+gQakxNtOfMqSqSeeMAHMp6684jm76p2yRog9pv7UE5WLJ8EEWajEMfLKYSBYIG9c2L3CPp+aJ+ot39SrAbq3BzCTiQvxC7Om6I7pOewU5m+ZVrlL/kLapi6lShx1vzZnGDzjJ0s+QFdY7sfm7NmqEgyZn1Q0L6IguT4/TmM0GNsB4XhO0IozXEa1EYzI//bS2eRtCLGh2TCND+4+mhdaBPsjD3F0g9C7hDU0cLPqOBd1Rzl22F0W8R0u5DzOp2ic4pdjVoWr7HV9ZS3nsnKANktLFQNSaQ3oH/dXyeY9kTfadKymPvDXavgCCmc/Q==";}'); if (!Signer::verify($data, $sign[0])) { Log::info('paymentNotifyToOut data: ' . $data . ' sign: ' . serialize($sign)); return [ @@ -39,6 +41,7 @@ class NotifyController extends AbstractController 'returnMsg' => '签名验证失败' ]; } + $params = json_decode($data, true); $outOrderNo = $params['outTradeNo'] ?: ''; $order = Order::where('out_order_no', $outOrderNo)->first(); if (!$order) {