Simplified reseller setup

This commit is contained in:
Hillel Coren 2016-05-13 12:23:13 +03:00
parent fba37171ae
commit f873998e22

View File

@ -328,13 +328,15 @@ class AccountRepository
$user->notify_paid = true;
$account->users()->save($user);
if ($config = env(NINJA_GATEWAY_CONFIG)) {
$accountGateway = new AccountGateway();
$accountGateway->user_id = $user->id;
$accountGateway->gateway_id = NINJA_GATEWAY_ID;
$accountGateway->public_id = 1;
$accountGateway->setConfig(json_decode(env(NINJA_GATEWAY_CONFIG)));
$accountGateway->setConfig(json_decode($config));
$account->account_gateways()->save($accountGateway);
}
}
return $account;
}