From a9bc3b267203fcd86d38f8435cb800890dd738fe Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Fri, 5 May 2023 21:49:27 +0800 Subject: [PATCH] xiug --- Application/Admin/Controller/ConsoleController.class.php | 6 ++++++ ThinkPHP/Library/Org/QzlPay/Response.class.php | 1 + 2 files changed, 7 insertions(+) diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php index b89bd50e1..d7a65ba49 100644 --- a/Application/Admin/Controller/ConsoleController.class.php +++ b/Application/Admin/Controller/ConsoleController.class.php @@ -4,6 +4,7 @@ */ namespace Admin\Controller; use Admin\Model\SpendModel; +use Org\QzlPay\Response; use Think\Think; use Base\Tool\Printer; use Base\Tool\TaskClient; @@ -895,6 +896,11 @@ class ConsoleController extends Think { } public function testPay() { + $str = '{"amount":"1.00","payResult":"0","mchOrderNo":"SP_202305052131158fDu","errMsg":"","resultCode":0,"sign":"BE8079D0A81558C9D222904546A9879B","traceTime":"20230505213132","message":"0","mchNo":"68822023041910000101","status":0}'; + $response = new Response($str); + var_dump($response); + var_dump($response->verify()); + return; $extra = [ 'notifyUrl' => 'http://api.chengfeng123.cn/notify/callback', 'callbackUrl' => 'http://api.chengfeng123.cn/page/redirect', diff --git a/ThinkPHP/Library/Org/QzlPay/Response.class.php b/ThinkPHP/Library/Org/QzlPay/Response.class.php index e0bed8c98..806ef92d4 100644 --- a/ThinkPHP/Library/Org/QzlPay/Response.class.php +++ b/ThinkPHP/Library/Org/QzlPay/Response.class.php @@ -60,6 +60,7 @@ class Response public function verify() { + var_dump('paySecret', Config::get('paySecret')); return Signer::verify($this->data, Config::get('paySecret')); } } \ No newline at end of file