array(1) { ["accounts"]=> array(1) { [0]=> array(9) { ["alias"]=> string(13) "qw_wallet_rub" ["fsAlias"]=> string(9) "qb_wallet" ["bankAlias"]=> string(4) "QIWI" ["title"]=> string(6) "WALLET" ["type"]=> array(2) { ["id"]=> string(6) "WALLET" ["title"]=> string(16) "Visa QIWI Wallet" } ["hasBalance"]=> bool(true) ["balance"]=> array(2) { ["amount"]=> float(1.3) ["currency"]=> int(643) } ["currency"]=> int(643) ["defaultAccount"]=> bool(true) } } }
$json = $payment->getBalance();
$return = json_decode($json);
$balance = $return[1] -> accounts[1] -> balance -> amount;
echo $balance;