【问题标题】:Reference existing buyers and merchants with Balanced通过 Balanced 引用现有买家和商家
【发布时间】:2012-08-17 09:41:29
【问题描述】:

我正在查看问题 (obtaining references to existing buyer and merchant accounts),它询问如何通过电子邮件引用 ruby​​ 帐户,并想知道如何使用 php 做同样的事情?

【问题讨论】:

    标签: php balanced-payments


    【解决方案1】:

    这是一个使用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";
    

    【讨论】:

    • 完美,谢谢。我已经看到了 uri,但无法确定电子邮件。
    猜你喜欢
    • 2012-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-25
    • 1970-01-01
    • 1970-01-01
    • 2012-08-31
    • 2015-04-24
    相关资源
    最近更新 更多