【发布时间】:2012-08-17 09:41:29
【问题描述】:
我正在查看问题 (obtaining references to existing buyer and merchant accounts),它询问如何通过电子邮件引用 ruby 帐户,并想知道如何使用 php 做同样的事情?
【问题讨论】:
标签: php balanced-payments
我正在查看问题 (obtaining references to existing buyer and merchant accounts),它询问如何通过电子邮件引用 ruby 帐户,并想知道如何使用 php 做同样的事情?
【问题讨论】:
标签: php balanced-payments
这是一个使用balanced-php库在PHP中通过电子邮件地址查找帐户的示例:
$buyer = $marketplace->accounts->query()->filter(Balanced\Account::$f->email_address->eq("buyer2@example.org"))->one();
如果您查看 balance-php 库中包含的 example.php 文件,您可以了解如何通过 URI 查找现有帐户:
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";
【讨论】: