mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
change account_type
This commit is contained in:
parent
9f062cc4f8
commit
e2d8ac37b5
@ -83,11 +83,9 @@ use App\Helpers\Bank\AccountTransformerInterface;
|
||||
*/
|
||||
|
||||
|
||||
class AccountTransformer implements AccountTransformerInterface
|
||||
{
|
||||
class AccountTransformer implements AccountTransformerInterface {
|
||||
|
||||
public function transform($nordigen_account)
|
||||
{
|
||||
public function transform($nordigen_account) {
|
||||
|
||||
if(!property_exists($nordigen_account, 'data') || !property_exists($nordigen_account, 'metadata') || !property_exists($nordigen_account, 'balances') || !property_exists($nordigen_account, 'institution'))
|
||||
throw new \Exception('invalid dataset');
|
||||
@ -102,8 +100,8 @@ class AccountTransformer implements AccountTransformerInterface
|
||||
}
|
||||
|
||||
return [
|
||||
'id' => $nordigen_account->metadata["id"], // TODO: maybe add prefix for unique id between yodlee and nordigen?
|
||||
'account_type' => "bank_account", // TODO: not creditCard, which type should be used here?!
|
||||
'id' => $nordigen_account->metadata["id"],
|
||||
'account_type' => "bank",
|
||||
'account_name' => $nordigen_account->data["iban"],
|
||||
'account_status' => $nordigen_account->metadata["status"],
|
||||
'account_number' => '**** '.substr($nordigen_account->data["iban"], -7),
|
||||
|
Loading…
x
Reference in New Issue
Block a user