From ab52bf5c01bf44b8cc628b05a2d0f1a336e2c662 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 13 Aug 2017 18:06:25 +0300 Subject: [PATCH] Fix paying for pro with PayPal --- app/Http/Controllers/AccountController.php | 8 +------- 1 file changed, 1 insertion(+), 7 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;