mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-08-30 23:20:34 -04:00
Simplified reseller setup
This commit is contained in:
parent
fba37171ae
commit
f873998e22
@ -328,13 +328,15 @@ class AccountRepository
|
|||||||
$user->notify_paid = true;
|
$user->notify_paid = true;
|
||||||
$account->users()->save($user);
|
$account->users()->save($user);
|
||||||
|
|
||||||
|
if ($config = env(NINJA_GATEWAY_CONFIG)) {
|
||||||
$accountGateway = new AccountGateway();
|
$accountGateway = new AccountGateway();
|
||||||
$accountGateway->user_id = $user->id;
|
$accountGateway->user_id = $user->id;
|
||||||
$accountGateway->gateway_id = NINJA_GATEWAY_ID;
|
$accountGateway->gateway_id = NINJA_GATEWAY_ID;
|
||||||
$accountGateway->public_id = 1;
|
$accountGateway->public_id = 1;
|
||||||
$accountGateway->setConfig(json_decode(env(NINJA_GATEWAY_CONFIG)));
|
$accountGateway->setConfig(json_decode($config));
|
||||||
$account->account_gateways()->save($accountGateway);
|
$account->account_gateways()->save($accountGateway);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user