我正在尝试一种方法来弄清楚如何通过电子邮件检索Stripe客户:
在我看来,我编写了以下代码:
<div>
<h1>An interesting article</h1>
<p>This is an interesting article about something. There will be a bunch of copy here. Some of it might even have a <a href="http://www.google.com">link in</a>. The links in the copy would look like normal links. The links outside of the paragraph should look like buttons.</p>
<a href="#">Read more about this</a>
</div>
基本上,如果通过他们的电子邮件找到了客户,那么我不需要创建新帐户。否则,将创建该帐户。最后一步是向新客户或现有客户收费。
代码无法正常工作。我认为这是搜索现有客户的错误方法。
有帮助吗?
谢谢!
答案 0 :(得分:1)
您不能通过电子邮件检索单个客户,因为您可以有多个具有相同电子邮件地址的客户-这不是唯一的价值。
相反,您可以列出与该电子邮件匹配的[0]个客户,然后自己决定是否有想要的结果。
[0] https://stripe.com/docs/api/customers/list#list_customers-email