From 9b4e0d134475734bd42a0ca10f2844d451570b2d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 13 Aug 2017 18:05:56 +0300 Subject: [PATCH] Fix paying for pro with PayPal --- app/Http/Controllers/AccountController.php | 8 +------- resources/lang/en/texts.php | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index b76051abe1c8..2d3baab83515 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -164,9 +164,7 @@ class AccountController extends BaseController Session::flash('warning', trans('texts.plan_refunded')); } - $hasPaid = false; if (! empty($planDetails['paid']) && $plan != PLAN_FREE) { - $hasPaid = true; $time_used = $planDetails['paid']->diff(date_create()); $days_used = $time_used->days; @@ -182,11 +180,7 @@ class AccountController extends BaseController if ($newPlan['price'] > $credit) { $invitation = $this->accountRepo->enablePlan($newPlan, $credit); - if ($hasPaid) { - return Redirect::to('view/' . $invitation->invitation_key); - } else { - return Redirect::to('payment/' . $invitation->invitation_key); - } + return Redirect::to('view/' . $invitation->invitation_key); } else { if ($plan == PLAN_FREE) { $company->discount = 0; diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 86bc60d65f95..6e05f85829bb 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1176,7 +1176,7 @@ $LANG = array( 'list_vendors' => 'List Vendors', 'add_users_not_supported' => 'Upgrade to the Enterprise plan to add additional users to your account.', 'enterprise_plan_features' => 'The Enterprise plan adds support for multiple users and file attachments, :link to see the full list of features.', - 'return_to_app' => 'Return to app', + 'return_to_app' => 'Return To App', // Payment updates