master
elf 1 year ago
parent bca410f33e
commit 691c1cfdeb

@ -42,7 +42,7 @@ class MineCommand extends HyperfCommand
public function handle(): void public function handle(): void
{ {
$this->rsyncBankCards(); $this->payment();
} }
protected function generateToken() { protected function generateToken() {

@ -35,6 +35,9 @@ class NotifyController extends AbstractController
{ {
[$token, $params] = $this->getTokenAndParams($request); [$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(); $baofu = new Baofu();
if (!$baofu->notifyVerify($params, 'register')) { if (!$baofu->notifyVerify($params, 'register')) {
Log::info('registerNotifyVerifyFail: ', $params); Log::info('registerNotifyVerifyFail: ', $params);
@ -174,7 +177,7 @@ class NotifyController extends AbstractController
protected function getTokenAndParams(RequestInterface $request) { protected function getTokenAndParams(RequestInterface $request) {
$token = $request->route('token'); $token = $request->route('token');
$params = $request->all(); $params = $request->all();
Log::info($request->getUri() . '[' . $token . ']:', $params); Log::info('NOTIFY_DATA: ' . $request->getUri() . '[' . $token . ']:', $params);
return [$token, $params]; return [$token, $params];
} }

@ -14,7 +14,7 @@ class RequestLog extends Model
public function getDataValue($key, $defaultValue = null) { public function getDataValue($key, $defaultValue = null) {
$data = $this->getData(); $data = $this->getData();
return $data[$key] ?: $defaultValue; return $data[$key] ?? $defaultValue;
} }
public function getData() { public function getData() {

Loading…
Cancel
Save