I was looking over the question (obtaining references to existing buyer and merchant accounts), which asked how to reference an account by email for ruby and was wondering how to do the same with php?
Asked
Active
Viewed 185 times
1 Answers
1
Here's an example of how to look up an account by email address in PHP using the balanced-php library:
$buyer = $marketplace->accounts->query()->filter(Balanced\Account::$f->email_address->eq("buyer2@example.org"))->one();
You can see how to look up an existing account by URI if you look at the example.php file included with the balanced-php library:
print "how do we look up an existing object from the URI?\n";
$the_buyer = Balanced\Account::get($buyer->uri);
print "we got the buyer " . $the_buyer->email_address . "\n";

mjallday
- 9,796
- 9
- 51
- 71
-
Perfect, thank you. I had seen the uri but couldn't figure the email one. – Kyle Aug 22 '12 at 20:11