什么是PayPal iOS sdk中的payerId

时间:2013-09-24 11:37:18

标签: ios paypal

我正在使用PayPal iOS sdk。但我对payerID完全感到困惑。这是什么以及如何工作。鉴于它可能是电子邮件或唯一标识符。我是否可以为每位付款人设置像 XYZ@gmail.com 这样的硬编码。

1 个答案:

答案 0 :(得分:1)

@Nikhil Chaurasiya,来自PayPal的Dave。

以下是PayPalPaymentViewController.h的相关位:

///    If payerId is nil, then PayPalPaymentViewController will treat the user as a one-time "guest":
///    - if the user logs into their PayPal account, then at the completion of their
///      transaction they will be logged back out; subsequent payments will require fresh logins.
///    - if the user pays with a credit card, that credit card information will not be "remembered"
///      for subsequent payments.

因此,如果您不知道该用户是否与上次使用该应用的用户相同,则应为nil提供payerId

另一方面,如果您有明确的方法来识别用户(例如用户的电子邮件地址),那么您每次都会在payerId中提供识别字符串。结果将是用户的PayPal登录或他们的信用卡信息从一个事务记忆到下一个事务。

如果有疑问,最安全的方法是将nil传递给payerId