|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace App\Command;
|
|
|
|
|
|
|
|
|
|
use App\Helper\Platform\Notification;
|
|
|
|
|
use App\Helper\Platform\Signer;
|
|
|
|
|
use App\Helper\StringHelper;
|
|
|
|
|
use App\Model\App;
|
|
|
|
@ -43,7 +44,7 @@ class MineCommand extends HyperfCommand
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
$this->rsyncUser('4673f922e30cfd2efeeb992ff6a32ece', '202308070000001', 'ELF1990');
|
|
|
|
|
$this->rsyncUser('247eda1b7de0c76603123c477f2072fa', '202308070000001', 'RLX1990');
|
|
|
|
@ -268,4 +269,25 @@ class MineCommand extends HyperfCommand
|
|
|
|
|
];
|
|
|
|
|
$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);
|
|
|
|
|
}
|
|
|
|
|
}
|