Fix paying for pro with PayPal
This commit is contained in:
parent
a006a3a77f
commit
ab52bf5c01
1 changed files with 1 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue