thirdpayment
elf 11 months ago
parent e363a30efc
commit c0a35feeb5

@ -47,10 +47,11 @@ class PaymentCommand extends HyperfCommand
* @var PaymentService $paymentService
*/
$paymentService = $this->container->make(PaymentService::class);
$fiveMinute = date('Y-m-d H:i:s', time() - 6*60);
$orders = Order::where('updated_at', '<=', $fiveMinute)->where('status', 'SUCCESS')->get();
$endTime = date('Y-m-d H:i:s', time() - 6*60);
$beginTime = date('Y-m-d H:i:s', time() - 20*60);
$orders = Order::where('updated_at', '>=', $beginTime)->where('updated_at', '<=', $endTime)->where('status', 'SUCCESS')->get();
foreach ($orders as $order) {
if ($order->user_id != 'ELF1990') {
if ($order->user_id != 'ELF1990' && strpos($order->user_id, 'ACT_') !== 0) {
continue;
}
$userId = $order->user_id;

@ -185,4 +185,13 @@ class AccountController extends AbstractController
}
return 'ACT_' . $accountId;
}
public function companyRegister(RequestInterface $request)
{
$userInfo = $this->checkUser($request);
$userId = $this->resetUserId($userInfo['userId']);
$requestLog = $this->createRequestLog(['userId' => $userId, 'email' => $request->input('email'), 'returnUrl' => 'http://124.223.222.61:9701/account.html']);
$url = $this->userService->companyRegister($requestLog->getData(), $requestLog->app, $requestLog->request_token);
return $this->success(['url' => $url]);
}
}

@ -47,6 +47,7 @@ Router::addGroup('/account',function () {
Router::post('/reset-pay-password', [AccountController::class, 'resetPayPassword']);
Router::post('/transfer-pay', [AccountController::class, 'transferPay']);
Router::post('/user-info', [AccountController::class, 'getUserInfo']);
Router::get('/company-register', [AccountController::class, 'companyRegister']);
}, []);
Router::addGroup('/notify',function () {

Loading…
Cancel
Save