[英]integration paypal with ios
如果您购买实体商品,PayPal SDK就可以了。 关于你的问题:切换到现场你只需要删除这一行
[PayPalPaymentViewController setEnvironment:PayPalEnvironmentNoNetwork];
您可能在iOS集成文档中遵循的示例代码将环境设置为PayPalEnvironmentNoNetwork
:
// Start out working with the test environment!
// When you are ready, remove this line to switch to live.
[PayPalPaymentViewController setEnvironment:PayPalEnvironmentNoNetwork];
您可以删除该行以PayPalEnvironmentProduction
,因为默认值为PayPalEnvironmentProduction
。
但是,您可能希望在上线之前通过将环境更改为PayPalEnvironmentSandbox
来测试集成:
[PayPalPaymentViewController setEnvironment:PayPalEnvironmentSandbox];
您可以在此处创建沙盒帐户。
切换到生产时,而不是删除该行,显式更安全,更清晰:
[PayPalPaymentViewController setEnvironment:PayPalEnvironmentProduction];
//for testing
[PayPalPaymentViewController setEnvironment:self.environment];
//for Paypal live app than it set in our app code
[PayPalPaymentViewController setEnvironment:PayPalEnvironmentProduction];
//check in Paypal sandbox account
[PayPalPaymentViewController setEnvironment:PayPalEnvironmentSandbox];
在PaymentMethodViewController
kPayPalEnvironment
全局变量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.