master
elf 2 years ago
parent 79e0e10061
commit a9bc3b2672

@ -4,6 +4,7 @@
*/ */
namespace Admin\Controller; namespace Admin\Controller;
use Admin\Model\SpendModel; use Admin\Model\SpendModel;
use Org\QzlPay\Response;
use Think\Think; use Think\Think;
use Base\Tool\Printer; use Base\Tool\Printer;
use Base\Tool\TaskClient; use Base\Tool\TaskClient;
@ -895,6 +896,11 @@ class ConsoleController extends Think {
} }
public function testPay() { 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 = [ $extra = [
'notifyUrl' => 'http://api.chengfeng123.cn/notify/callback', 'notifyUrl' => 'http://api.chengfeng123.cn/notify/callback',
'callbackUrl' => 'http://api.chengfeng123.cn/page/redirect', 'callbackUrl' => 'http://api.chengfeng123.cn/page/redirect',

@ -60,6 +60,7 @@ class Response
public function verify() public function verify()
{ {
var_dump('paySecret', Config::get('paySecret'));
return Signer::verify($this->data, Config::get('paySecret')); return Signer::verify($this->data, Config::get('paySecret'));
} }
} }
Loading…
Cancel
Save