diff --git a/app/Command/MineCommand.php b/app/Command/MineCommand.php index e5e9225..7fe1399 100644 --- a/app/Command/MineCommand.php +++ b/app/Command/MineCommand.php @@ -45,6 +45,8 @@ class MineCommand extends HyperfCommand public function handle(): void { + $this->payment(); + return; // $this->notify('http://ceshi-shop.hkcpex.com/index.php/pay/notify/baofu_f_register', $this->getApp(), ['userId' => '30684']); $this->notify('http://ceshi-shop.hkcpex.com/index.php/pay/notify/baofu_f_bind_card', $this->getApp(), ['userId' => '23121', 'bindCardFlag' => true]); return; @@ -179,7 +181,6 @@ class MineCommand extends HyperfCommand 'returnUrl' => 'http://www.baidu.com', 'amount' => 100, 'outOrderNo' => time() . rand(1000, 9999), - 'expiresIn' => 10*60, 'splitInfoList' => [ [ 'userId' => 'RLX1990', diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index 0345ee3..4c0854d 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -86,7 +86,7 @@ class PaymentService extends AbstractService } public function createOrder(App $app, array $params, User $user) { - $expiresIn = $params['expiresIn'] ?: 15 * 60; + $expiresIn = $params['expiresIn'] ?? 10 * 60; $order = new Order(); $order->app_id = $app->app_id; $order->user_id = $user->user_id; @@ -101,7 +101,7 @@ class PaymentService extends AbstractService $order->pay_channel = 'BAOFU'; $order->pay_method = 'paymentSplit'; $order->pay_type = 'CARD'; - $order->expired_at = date('Y-m-d H:i:s', $expiresIn); + $order->expired_at = date('Y-m-d H:i:s', time() + $expiresIn); $order->org_split_info_list = $params['splitInfoList']; $order->save();