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