From 1dd3e3c3e158239aed56879461e44685bcdd6168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=94=E5=A7=AC=E6=A1=91?= Date: Tue, 28 Apr 2020 02:03:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/DailyJob.php | 4 ++-- app/Http/Controllers/Gateway/PayPal.php | 5 +++++ resources/lang/en/auth.php | 1 + resources/lang/zh-CN/auth.php | 1 + resources/lang/zh-tw/auth.php | 1 + resources/views/auth/register.blade.php | 2 +- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/DailyJob.php b/app/Console/Commands/DailyJob.php index eed476b4..f7f50283 100644 --- a/app/Console/Commands/DailyJob.php +++ b/app/Console/Commands/DailyJob.php @@ -147,7 +147,7 @@ class DailyJob extends Command // 过期生效中的加油包 Order::query() ->with(['goods']) - ->whereUserID($user->id) + ->whereUserId($user->id) ->whereStatus(2) ->whereIsExpire(0) ->whereHas('goods', function($q){ @@ -165,7 +165,7 @@ class DailyJob extends Command } // 重置流量 User::query()->whereId($user->id)->update(['u' => 0, 'd' => 0, 'transfer_enable' => $order->goods->traffic*1048576, 'reset_time' => $nextResetTime]); - //Log::info('用户[ID:'.$user->id.' 昵称: '.$user->username.' 邮箱: '.$user->email.'] 流量重置为 '.($order->goods->traffic*1048576).'. 重置日期为 '.($nextResetTime? : '【无】')); + Log::info('用户[ID:'.$user->id.' 昵称: '.$user->username.' 邮箱: '.$user->email.'] 流量重置为 '.($order->goods->traffic*1048576).'. 重置日期为 '.($nextResetTime? : '【无】')); } } } \ No newline at end of file diff --git a/app/Http/Controllers/Gateway/PayPal.php b/app/Http/Controllers/Gateway/PayPal.php index e718c634..21bd2c82 100644 --- a/app/Http/Controllers/Gateway/PayPal.php +++ b/app/Http/Controllers/Gateway/PayPal.php @@ -62,6 +62,11 @@ class PayPal extends AbstractPayment try{ $response = $this->provider->setExpressCheckout($data); + if(!$response['paypal_link']){ + Log::error(var_export($response, TRUE)); + + return Response::json(['status' => 'fail', 'message' => '创建订单失败,请使用其他方式或通知管理员!']); + } Payment::whereId($payment->id)->update(['url' => $response['paypal_link']]); return Response::json(['status' => 'success', 'url' => $response['paypal_link'], 'message' => '创建订单成功!']); diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index 72defc16..c22ddfce 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -7,6 +7,7 @@ return [ 'active_tip' => 'Account is not active yet, Please ', 'captcha' => 'Verification code', 'code' => 'Invite Code', + 'optional' => 'Optional', 'login' => 'Sign In', 'register' => 'Sign Up', 'send' => 'Send', diff --git a/resources/lang/zh-CN/auth.php b/resources/lang/zh-CN/auth.php index fae4d984..931531d3 100644 --- a/resources/lang/zh-CN/auth.php +++ b/resources/lang/zh-CN/auth.php @@ -6,6 +6,7 @@ return [ 'active_tip' => '账号未激活,请点击', 'captcha' => '验证码', 'code' => '邀请码', + 'optional' => '可选', 'login' => '登 录', 'register' => '注 册', 'send' => '发送', diff --git a/resources/lang/zh-tw/auth.php b/resources/lang/zh-tw/auth.php index 08d101a6..e04ea62a 100644 --- a/resources/lang/zh-tw/auth.php +++ b/resources/lang/zh-tw/auth.php @@ -6,6 +6,7 @@ return [ 'active_tip' => '賬號未激活,請點擊', 'captcha' => '驗證碼', 'code' => '邀請碼', + 'optional' => '可選', 'login' => '登 錄', 'register' => '注 冊', 'send' => '發送', diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index d913707e..37cc3f12 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -63,7 +63,7 @@ @if(\App\Components\Helpers::systemConfig()['is_invite_register'])
- +
@if(\App\Components\Helpers::systemConfig()['is_free_code'])