vendredi 31 octobre 2014

Stripe API Balance


Vote count:

0




I am trying to retrieve my Stripe balance using the Stripe API with PHP.


I am calling the following:



function retrieve_balance()
{
$response = Stripe_Balance::retrieve();

return $response;
}


This returns something like this:



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...


I've tried doing the following but it only resulted in an error. I'm trying to get the amount of pending and available.



<?php
var_dump($balance);
/*Issue Line Below*/
echo $balance->pending->amount;
?>


The error I get is: Trying to get property of non-object



asked 21 secs ago







Stripe API Balance

Aucun commentaire:

Enregistrer un commentaire