我正在尝试使用带有PHP的Stripe API检索我的条纹余额。条纹API余额
我打电话以下几点:
function retrieve_balance()
{
$response = Stripe_Balance::retrieve();
return $response;
}
这将返回是这样的:
object(Stripe_Balance)#28 (5) {
["_apiKey":protected]=>
string(32) "my_key_here"
["_values":protected]=>
array(4) {
["pending"]=>
array(1) {
[0]=>
object(Stripe_Object)#32 (5) {
["_apiKey":protected]=>
string(32) "my_key_here"
["_values":protected]=>
array(2) {
["amount"]=>
int(0)
["currency"]=>
string(3) "usd"
etc...
我试着做以下,但它只能导致错误。我正在尝试获取待处理和可用的数量。
<?php
var_dump($balance);
/*Issue Line Below*/
echo $balance->pending->amount;
?>
我得到的错误是:Trying to get property of non-object
它看起来像挂起的是对象的数组,你有没有试过'$ BALANCE->待定[0] - > amount' – Cory 2014-11-01 00:15:23