Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balance is null #194

Closed
1 task
Tantuss opened this issue Apr 29, 2020 · 5 comments
Closed
1 task

Balance is null #194

Tantuss opened this issue Apr 29, 2020 · 5 comments

Comments

@Tantuss
Copy link

Tantuss commented Apr 29, 2020

Steps to reproduce:

Small piece of PHP code:
$monetaryAccounts = MonetaryAccount::listing()->getValue();
foreach ($monetaryAccounts as $monetaryAccount) {
$account = $monetaryAccount->getMonetaryAccountBank();
$balance = $account->getBalance()->getValue();
}

This '$account->getBalance()' is already returning NULL, so the getValue() is generating an error.

What should happen:

  1. Get a balance back.

What happens:

  1. Balance is NULL, what isn't correct. There is for sure money on the accounts.

SDK version and environment

  • Tested on 0.13.1
  • PHP 7.2.27-5+020200202.35+debian91 (cli)
  • Sandbox
  • [ X ] Production
@basst85
Copy link

basst85 commented Apr 30, 2020

Steps to reproduce:

Small piece of PHP code:
$monetaryAccounts = MonetaryAccount::listing()->getValue();
foreach ($monetaryAccounts as $monetaryAccount) {
$account = $monetaryAccount->getMonetaryAccountBank();
$balance = $account->getBalance()->getValue();
}

This '$account->getBalance()' is already returning NULL, so the getValue() is generating an error.

Hello!

This code works on my machine, it returns the balances of all active monetary accounts:

$monetaryAccountList = MonetaryAccountBank::listing([])->getValue();

foreach ($monetaryAccountList as $monetaryAccount) {
	if ($monetaryAccount->getStatus() === 'ACTIVE') {
		echo $monetaryAccount->getBalance()->getValue() . '<br/>';
	}
}

@Tantuss
Copy link
Author

Tantuss commented May 4, 2020

Is it possible to do some setting in the app to hide your balance in the API?

@basst85
Copy link

basst85 commented May 5, 2020

Is it possible to do some setting in the app to hide your balance in the API?

Nope, your account balances are always visible via the API

@Tantuss
Copy link
Author

Tantuss commented May 5, 2020

I tried with another Bunq account, then it works fine.
I attached the debugger and then I really see that the balance value is null, so it looks like it's some issue in the Bunq API and not in this library.

@Tantuss
Copy link
Author

Tantuss commented May 5, 2020

I think it's some security issue, I will send a detailed report how to reproduce directly to the support of Bunq. So their tech support can look into it.

@Tantuss Tantuss closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants