mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Updated Account Controller to work when no present payment libraries are in use.
This commit is contained in:
parent
7c39574720
commit
381d2604b0
@ -165,11 +165,19 @@ class AccountController extends \BaseController {
|
|||||||
$account = Account::with('account_gateways')->findOrFail(Auth::user()->account_id);
|
$account = Account::with('account_gateways')->findOrFail(Auth::user()->account_id);
|
||||||
$accountGateway = null;
|
$accountGateway = null;
|
||||||
$config = null;
|
$config = null;
|
||||||
|
$configFields = null;
|
||||||
|
|
||||||
if (count($account->account_gateways) > 0)
|
if (count($account->account_gateways) > 0)
|
||||||
{
|
{
|
||||||
$accountGateway = $account->account_gateways[0];
|
$accountGateway = $account->account_gateways[0];
|
||||||
$config = $accountGateway->config;
|
$config = $accountGateway->config;
|
||||||
|
|
||||||
|
$configFields = json_decode($config);
|
||||||
|
|
||||||
|
foreach($configFields as $configField => $value)
|
||||||
|
{
|
||||||
|
$configFields->$configField = str_repeat('*', strlen($value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$recommendedGateways = Gateway::remember(DEFAULT_QUERY_CACHE)
|
$recommendedGateways = Gateway::remember(DEFAULT_QUERY_CACHE)
|
||||||
@ -191,13 +199,6 @@ class AccountController extends \BaseController {
|
|||||||
$recommendedGatewayArray[$recommendedGateway->name] = $arrayItem;
|
$recommendedGatewayArray[$recommendedGateway->name] = $arrayItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
$configFields = json_decode($config);
|
|
||||||
|
|
||||||
foreach($configFields as $configField => $value)
|
|
||||||
{
|
|
||||||
$configFields->$configField = str_repeat('*', strlen($value));
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'account' => $account,
|
'account' => $account,
|
||||||
'accountGateway' => $accountGateway,
|
'accountGateway' => $accountGateway,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user