master
ljl 1 year ago
parent 2d5fde3b8b
commit 3a8bbd6888

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Command; namespace App\Command;
use App\Helper\Platform\Notification;
use App\Helper\Platform\Signer; use App\Helper\Platform\Signer;
use App\Helper\StringHelper; use App\Helper\StringHelper;
use App\Model\App; use App\Model\App;
@ -43,7 +44,7 @@ class MineCommand extends HyperfCommand
public function handle(): void public function handle(): void
{ {
$this->register('test'); $this->notify('http://ceshi-shop.hkcpex.com/index.php/pay/notify/baofu_f_register', $this->getApp(), ['userId' => '30684']);
return; return;
$this->rsyncUser('4673f922e30cfd2efeeb992ff6a32ece', '202308070000001', 'ELF1990'); $this->rsyncUser('4673f922e30cfd2efeeb992ff6a32ece', '202308070000001', 'ELF1990');
$this->rsyncUser('247eda1b7de0c76603123c477f2072fa', '202308070000001', 'RLX1990'); $this->rsyncUser('247eda1b7de0c76603123c477f2072fa', '202308070000001', 'RLX1990');
@ -268,4 +269,25 @@ class MineCommand extends HyperfCommand
]; ];
$paymentService->refundConfirm($data, $this->getApp(), $this->getToken()); $paymentService->refundConfirm($data, $this->getApp(), $this->getToken());
} }
protected function notify($url, $app, $data)
{
if (empty($url)) {
return 'empty url';
}
$params = [
'app_id' => $app->app_id,
'nonce_str' => StringHelper::getRandomString(32),
'timestamp' => time(),
];
$params['data'] = json_encode($data);
$params['sign'] = Signer::sign($params, $app->app_key);
Log::info('notifyToOut params:', $params, 'platform');
Log::info('notifyToOut url:' . $url, [], 'platform');
$result = Notification::post($url, $params);
Log::info('notifyToOut response:' . $result, [], 'platform');
var_dump($result);
}
} }

@ -54,7 +54,7 @@ class NotifyController extends AbstractController
$requestLog->getDataValue('notifyUrl'), $requestLog->getDataValue('notifyUrl'),
$requestLog->app, $requestLog->app,
[ [
'user_id' => $params['loginNo'], 'userId' => $params['userId'],
] ]
); );
@ -82,8 +82,8 @@ class NotifyController extends AbstractController
$requestLog->getDataValue('notifyUrl'), $requestLog->getDataValue('notifyUrl'),
$requestLog->app, $requestLog->app,
[ [
'bind_card_flag' => $bindCardFlag, 'bindCardFlag' => $bindCardFlag,
'user_id' => $params['loginNo'], 'userId' => $requestLog->getDataValue('userId'),,
] ]
); );

Loading…
Cancel
Save