Closed sohaieb closed 3 years ago
Any updates please about my topic ??
Hi @sohaieb
I've written some tests using your code, and the bank account deactivates.
Please check: 425
Hello @SoloJr , Thank you for your answer, but to add an additional information: my code wich i wrote before is used in a Laravel 5.7 project. i will re-test this again and i will give you more details about it.
thank you @SoloJr , to confirm, it was a problem when i wanted to retreive the last created BankAccount, so my fault is that i'm getting the first account bank wich is Disabled instead of getting the last created BankAccount wich is Enabled , here is my bad and correct code s now : The problem was here :
$this->api->Users->GetBankAccounts($userId);
$bankAccount = $this->api->Users->GetBankAccounts($userId)[0];
$bankAccount = $this->api->Users->GetBankAccount($userId,$bankAccount->Id);
The correction is here:
$countBanks = count($this->api->Users->GetBankAccounts($userId));
$bankAccount = $this->api->Users->GetBankAccounts($userId)[$countBanks-1];
Hello,
i tried to update BankAccount active status, but i could not do that, here is my code :
the result of the $bk variable still containing Active = true not false
thanks