diff --git a/app/Command/MineCommand.php b/app/Command/MineCommand.php index 0b4b70c..1741942 100644 --- a/app/Command/MineCommand.php +++ b/app/Command/MineCommand.php @@ -42,7 +42,7 @@ class MineCommand extends HyperfCommand public function handle(): void { - $this->rsyncBankCards(); + $this->payment(); } protected function generateToken() { diff --git a/app/Controller/Payment/NotifyController.php b/app/Controller/Payment/NotifyController.php index 6fe7568..965974f 100644 --- a/app/Controller/Payment/NotifyController.php +++ b/app/Controller/Payment/NotifyController.php @@ -35,6 +35,9 @@ class NotifyController extends AbstractController { [$token, $params] = $this->getTokenAndParams($request); + $params = json_decode('{"orgNo":"1274207","merchantNo":"1274207","terminalNo":"82254","contractNo":"3177000505324724","loginNo":"1f32d22ff571ebc692bd50785c883ca8","signature":"362a896de0b5bbcc2e60b6aa77ea8969b4b24b8ee2474bcafd5b2274227dba16d87d071c5faeac058cad41cf7a6cacaa5be47f3c0dfdec834a2f8d5fd684d1c21b879a4b300d69951d2fc7cfc7cbafb8de25e60974c88c293f43bfb133beb89709ddea0e09dd29abb93c829dace39074dea458aa6c5c6e7a3b7e8e487465f9c9"}', true); + $token = '2bfb6ece9414e047909c55160e6aea21'; + $baofu = new Baofu(); if (!$baofu->notifyVerify($params, 'register')) { Log::info('registerNotifyVerifyFail: ', $params); @@ -174,7 +177,7 @@ class NotifyController extends AbstractController protected function getTokenAndParams(RequestInterface $request) { $token = $request->route('token'); $params = $request->all(); - Log::info($request->getUri() . '[' . $token . ']:', $params); + Log::info('NOTIFY_DATA: ' . $request->getUri() . '[' . $token . ']:', $params); return [$token, $params]; } diff --git a/app/Model/RequestLog.php b/app/Model/RequestLog.php index 63266f5..92c4b52 100644 --- a/app/Model/RequestLog.php +++ b/app/Model/RequestLog.php @@ -14,7 +14,7 @@ class RequestLog extends Model public function getDataValue($key, $defaultValue = null) { $data = $this->getData(); - return $data[$key] ?: $defaultValue; + return $data[$key] ?? $defaultValue; } public function getData() {