Update
parent
7eefc5a7a7
commit
8c1cf2caa2
|
|
@ -14,9 +14,9 @@ class YeePayNotifyController extends Controller
|
|||
{
|
||||
public function __invoke(Request $request)
|
||||
{
|
||||
logger()->debug('yeepay notify', $request->input());
|
||||
$this->info('request parameters', $request->input());
|
||||
|
||||
// $this->validateSign($request);
|
||||
$this->validateSign($request);
|
||||
|
||||
switch ($request->input('service')) {
|
||||
case 'accountpay.behalf.Pay':
|
||||
|
|
@ -85,15 +85,18 @@ class YeePayNotifyController extends Controller
|
|||
{
|
||||
$yeePayService = new YeePayService(config('services.yeepay'));
|
||||
|
||||
logger()->debug('yeepay notify sign------>', [
|
||||
'sign' => $request->input('sign'),
|
||||
'sign2' => $yeePayService->sign($request->input()),
|
||||
]);
|
||||
|
||||
if ($request->input('sign') === $yeePayService->sign($request->input())) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Exception('签名错误');
|
||||
}
|
||||
|
||||
protected function info($message, array $context = [])
|
||||
{
|
||||
logger()->build([
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/yeepay-notify.log'),
|
||||
])->info('yeepay notify', $context);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue