在苹果应用商店中提交应用程序之前,是否可以使用PayPal Live凭据(clientID&;sandboxID)测试iOS应用程序?
很抱歉问这个问题。因为没有关于这个问题的链接,但我的意图有点不同,这就是我在这里发布这个问题的原因: 在Apple app Store中提交应用程序之前,是否可以使用PayPal Live凭据检查iOS应用程序 问题是,在苹果方面,有两个概念,如推送通知和应用内购买(生产未在开发中),我们无法在测试时间进行检查。我觉得贝宝也一样。但我有点怀疑 通过使用: 我已经在我的应用程序中集成了paypal,它在沙盒中运行良好,但现在我想在live app id上进行实时运行,所以我需要做什么 在这里,我面临着一个与以下问题相同的问题: 注意:我已经在developer.PayPal.com上发布了红色PayPal iOS SDK集成过程 (1) “使用向应用程序所有者注册的PayPal帐户的凭据登录PayPal开发者网站。请注意,与应用程序关联的PayPal帐户必须是已验证的Premier或已验证的Business帐户。” 我也做了同样的事。现在我使用的是有效的实时客户端id和沙盒密钥 在安卓系统中: 实时凭证工作正常 在iOS中:它说的是一个错误,就像我在上面提到的一样 我如何解决这个问题?你能帮帮我吗 这里我使用的代码如下:在苹果应用商店中提交应用程序之前,是否可以使用PayPal Live凭据(clientID&;sandboxID)测试iOS应用程序?,ios,objective-c,Ios,Objective C,很抱歉问这个问题。因为没有关于这个问题的链接,但我的意图有点不同,这就是我在这里发布这个问题的原因: 在Apple app Store中提交应用程序之前,是否可以使用PayPal Live凭据检查iOS应用程序 问题是,在苹果方面,有两个概念,如推送通知和应用内购买(生产未在开发中),我们无法在测试时间进行检查。我觉得贝宝也一样。但我有点怀疑 通过使用: 我已经在我的应用程序中集成了paypal,它在沙盒中运行良好,但现在我想在live app id上进行实时运行,所以我需要做什么 在这里,我面
#pragma mark
#pragma mark -- connectToPayPalBtnClicked
- (IBAction)connectToPayPalBtnClicked:(id)sender {
// // Create a PayPalPayment
PayPalPayment *payment = [[PayPalPayment alloc] init];
payment.amount = [[NSDecimalNumber alloc] initWithString:@"10.95"];
//we recommend limiting transactions to currencies supported by both payment types. Currently these are: USD, GBP, CAD, EUR, JPY.
payment.currencyCode = @"USD";
payment.shortDescription = @"Awesome saws";
// Check whether payment is processable.
if (!payment.processable) {
// If, for example, the amount was negative or the shortDescription was empty, then
// this payment would not be processable. You would want to handle that here.
}
/*
For Test Account purpose
[PayPalMobile initializeWithClientIdsForEnvironments:@{
PayPalEnvironmentSandbox : PayPalClienKey}];
*/
[PayPalMobile initializeWithClientIdsForEnvironments:@{PayPalEnvironmentProduction : @"AU2qoYgXhfghgfhgfhfghhNS_QYjTSMV_LS4RmG-qbPGdXODlvJXuSE5jXQRAeJEwPvh6h4C",
PayPalEnvironmentSandbox : @"ELQN7GqTJZDCH3Qfr17wyhfghfghgfhhg9esR9fyJ9prL6xKfFURMoAK0PZw0scTB5I6Un "}];
#ifdef CONFIGURATION_ReleaseLive
[PayPalMobile preconnectWithEnvironment:PayPalEnvironmentProduction];
#else
[PayPalMobile preconnectWithEnvironment:PayPalEnvironmentSandbox]; // PayPalEnvironmentSandbox ?
#endif
[self setPayPalConfig:[[PayPalConfiguration alloc] init]];
[[self payPalConfig] setAcceptCreditCards:YES];
[[self payPalConfig] setPayPalShippingAddressOption:PayPalShippingAddressOptionNone];
[[self payPalConfig] setLanguageOrLocale:[NSLocale preferredLanguages][0]];
// Create a PayPalPaymentViewController.
PayPalPaymentViewController *paymentViewController;
paymentViewController = [[PayPalPaymentViewController alloc] initWithPayment:payment
configuration:self.payPalConfiguration
delegate:self];
// Present the PayPalPaymentViewController.
[self presentViewController:paymentViewController animated:YES completion:nil];
}
#pragma mark - PayPalPaymentDelegate methods
- (void)payPalPaymentViewController:(PayPalPaymentViewController *)paymentViewController
didCompletePayment:(PayPalPayment *)completedPayment {
NSLog(@"PayPal Payment Success!");
// Payment was processed successfully; send to server for verification and fulfillment.
[self verifyCompletedPayment:completedPayment];
// Dismiss the PayPalPaymentViewController.
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)payPalPaymentDidCancel:(PayPalPaymentViewController *)paymentViewController {
NSLog(@"PayPal Payment Canceled");
// The payment was canceled; dismiss the PayPalPaymentViewController.
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)verifyCompletedPayment:(PayPalPayment *)completedPayment {
// Send the entire confirmation dictionary
confirmation = [NSJSONSerialization dataWithJSONObject:completedPayment.confirmation
options:0
error:nil];
NSLog(@"Here is your proof of payment:\n\n%@\n\nSend this to your server for confirmation and fulfillment.", completedPayment.confirmation);
// Send confirmation to your server; your server should verify the proof of payment
// and give the user their goods or services. If the server is not reachable, save
// the confirmation and try again later.
}
是的,您可以测试live凭据。它不需要苹果提供与推送通知或应用内购买相同的权限 除了在appDelegate中添加生产客户端ID外,您还需要在加载PayPalmPaymentViewController的任何viewController的ViewWillExample部分中添加此行:
[PayPalMobile preconnectWithEnvironment:PayPalEnvironmentProduction];
现在,当PayPal check out视图加载后,您可以使用自己的live PayPal帐户(请小心,因为如果您付款,它将是为了真正的钱),而不是您设置的开发人员帐户 ThanQ@Ryan Friedman。如果你没有我的,我怎样才能得到客户的实时生产密钥,你能和我分享一些示例代码吗