mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 12:14:29 -04:00
Support affiliate partners
This commit is contained in:
parent
0203bdf40b
commit
d862cb185c
@ -45,6 +45,15 @@ class AccountRepository
|
||||
$company->promo_expires = date_create()->modify('14 days')->format('Y-m-d');
|
||||
}
|
||||
|
||||
if (env('PARTNER_CAMPAIGN') && Input::get('utm_campaign') == env('PARTNER_CAMPAIGN')) {
|
||||
$company->plan = PLAN_PRO;
|
||||
$company->plan_term = PLAN_TERM_YEARLY;
|
||||
$company->plan_price = PLAN_PRICE_PRO_MONTHLY;
|
||||
$company->plan_started = date_create()->format('Y-m-d');
|
||||
$company->plan_paid = date_create()->format('Y-m-d');
|
||||
$company->plan_expires = date_create()->modify('1 year')->format('Y-m-d');
|
||||
}
|
||||
|
||||
$company->save();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user