|
@@ -7,8 +7,7 @@ use App\Services\GongdengOrderService;
|
|
|
use App\Services\NotifyService;
|
|
use App\Services\NotifyService;
|
|
|
use App\Services\RedisService;
|
|
use App\Services\RedisService;
|
|
|
use App\Services\WechatService;
|
|
use App\Services\WechatService;
|
|
|
-use Psr\Http\Message\MessageInterface;
|
|
|
|
|
-use Psr\Http\Message\ResponseInterface;
|
|
|
|
|
|
|
+use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 回调控制器
|
|
* 回调控制器
|
|
@@ -27,12 +26,11 @@ class NotifyController extends BaseController
|
|
|
* @since 2020/11/11
|
|
* @since 2020/11/11
|
|
|
* NotifyController constructor.
|
|
* NotifyController constructor.
|
|
|
*/
|
|
*/
|
|
|
- public function __construct(ResponseInterface $response)
|
|
|
|
|
|
|
+ public function __construct()
|
|
|
{
|
|
{
|
|
|
parent::__construct();
|
|
parent::__construct();
|
|
|
|
|
|
|
|
$this->service = new GongdengOrderService();
|
|
$this->service = new GongdengOrderService();
|
|
|
- $this->response = $response;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -46,8 +44,10 @@ class NotifyController extends BaseController
|
|
|
/* $sign = 'JnLbXF3HLEeAVuyVoyedezPV8+mRZ93+rmlbHOIm1I0+YKboBTUmVNwlV9KKOVPXPBQENxjHqT6fR5Qx326uVZryb\/JM+lTdvl3j+XVD0F5NJWZKGu7Zykf69yYMY3wbe1++em\/iiouZLg8\/5KRp7nvNMLL383gemOMRbsYN3+dZ++62qrmVZxo00fHlK+AjxXmV38KRCLtfLWfIsUXw9Zi8hXqHbf+s\/pBthV+Ouasw0Eit4f4E3aDjp4baFD70s\/RsbcqTn8UqxCurRNgm7kCtLphzStPnEUC1dfvIWZQIuJ+BaAqstj9y7RW5CdF7aZPqhXnPETvB8ZynSTYl3Q==';
|
|
/* $sign = 'JnLbXF3HLEeAVuyVoyedezPV8+mRZ93+rmlbHOIm1I0+YKboBTUmVNwlV9KKOVPXPBQENxjHqT6fR5Qx326uVZryb\/JM+lTdvl3j+XVD0F5NJWZKGu7Zykf69yYMY3wbe1++em\/iiouZLg8\/5KRp7nvNMLL383gemOMRbsYN3+dZ++62qrmVZxo00fHlK+AjxXmV38KRCLtfLWfIsUXw9Zi8hXqHbf+s\/pBthV+Ouasw0Eit4f4E3aDjp4baFD70s\/RsbcqTn8UqxCurRNgm7kCtLphzStPnEUC1dfvIWZQIuJ+BaAqstj9y7RW5CdF7aZPqhXnPETvB8ZynSTYl3Q==';
|
|
|
$timestamp = '1626663968';
|
|
$timestamp = '1626663968';
|
|
|
$nonce = 'yWa6xnLUDyqfVYhjTnWcafDuNzgoXMNa';*/
|
|
$nonce = 'yWa6xnLUDyqfVYhjTnWcafDuNzgoXMNa';*/
|
|
|
- $body = NotifyService::getBody($this->response);
|
|
|
|
|
|
|
+ //$body = NotifyService::getBody($this->response);
|
|
|
|
|
+ $body = file_get_contents('php://input');
|
|
|
$signStr = "{$timestamp}\n{$nonce}\n{$body}\n";
|
|
$signStr = "{$timestamp}\n{$nonce}\n{$body}\n";
|
|
|
|
|
+ var_dump($signStr);
|
|
|
$id = isset($postData['id'])? '_'.$postData['id'] : '';
|
|
$id = isset($postData['id'])? '_'.$postData['id'] : '';
|
|
|
RedisService::set('caches:payments:'.$scene.':result'.$id.'_'.date('YmdHis'), ['result'=> $postData,'sign'=> $sign,'date'=> date('Y-m-d H:i:s')], 7200);
|
|
RedisService::set('caches:payments:'.$scene.':result'.$id.'_'.date('YmdHis'), ['result'=> $postData,'sign'=> $sign,'date'=> date('Y-m-d H:i:s')], 7200);
|
|
|
$postData = isset($postData['resource'])? $postData['resource'] : [];
|
|
$postData = isset($postData['resource'])? $postData['resource'] : [];
|