mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-14 13:44:36 -04:00
Fix paying for pro with PayPal
This commit is contained in:
parent
22d3bb6c07
commit
9b4e0d1344
@ -164,9 +164,7 @@ class AccountController extends BaseController
|
|||||||
Session::flash('warning', trans('texts.plan_refunded'));
|
Session::flash('warning', trans('texts.plan_refunded'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$hasPaid = false;
|
|
||||||
if (! empty($planDetails['paid']) && $plan != PLAN_FREE) {
|
if (! empty($planDetails['paid']) && $plan != PLAN_FREE) {
|
||||||
$hasPaid = true;
|
|
||||||
$time_used = $planDetails['paid']->diff(date_create());
|
$time_used = $planDetails['paid']->diff(date_create());
|
||||||
$days_used = $time_used->days;
|
$days_used = $time_used->days;
|
||||||
|
|
||||||
@ -182,11 +180,7 @@ class AccountController extends BaseController
|
|||||||
|
|
||||||
if ($newPlan['price'] > $credit) {
|
if ($newPlan['price'] > $credit) {
|
||||||
$invitation = $this->accountRepo->enablePlan($newPlan, $credit);
|
$invitation = $this->accountRepo->enablePlan($newPlan, $credit);
|
||||||
if ($hasPaid) {
|
return Redirect::to('view/' . $invitation->invitation_key);
|
||||||
return Redirect::to('view/' . $invitation->invitation_key);
|
|
||||||
} else {
|
|
||||||
return Redirect::to('payment/' . $invitation->invitation_key);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ($plan == PLAN_FREE) {
|
if ($plan == PLAN_FREE) {
|
||||||
$company->discount = 0;
|
$company->discount = 0;
|
||||||
|
@ -1176,7 +1176,7 @@ $LANG = array(
|
|||||||
'list_vendors' => 'List Vendors',
|
'list_vendors' => 'List Vendors',
|
||||||
'add_users_not_supported' => 'Upgrade to the Enterprise plan to add additional users to your account.',
|
'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.',
|
'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
|
// Payment updates
|
||||||
|
Loading…
x
Reference in New Issue
Block a user