gpt4 book ai didi

ios6 - Paypal Sandbox 不适用于使用 Paypal iOS SDK 的非美国开发人员

转载 作者:太空宇宙 更新时间:2023-11-03 16:03:18 24 4
gpt4 key购买 nike

在我的 iOS 应用程序中,我使用来自 https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index 的 paypal sdk 集成了自适应支付。

paypal 更改其站点后,我无法使用上述库执行交易。

这是我的代码

    -(void)processSplitPaymentWithFacebuyAdminPayPalId:(NSString*)adminId sellerPayPalId:(NSString*)sellerId withAdminPercentage:(NSNumber*)adminPercentage forTotalAmount:(NSNumber*)totalAmount andShippingCharges:(NSNumber*)shippingCharges
{
NSLog(@"!!!--------------------------------------");
NSLog(@"AdminID: %@",adminId);
NSLog(@"SellerID: %@",sellerId);
NSLog(@"Admin Percentage: %@",adminPercentage);
NSLog(@"Total Amount: %@",totalAmount);
NSLog(@"Shipping Charges: %@",shippingCharges);
NSLog(@"!!!--------------------------------------");

PayPal *ppMEP = [PayPal getPayPalInst];
ppMEP.shippingEnabled = TRUE;
ppMEP.dynamicAmountUpdateEnabled = TRUE;
ppMEP.feePayer = FEEPAYER_EACHRECEIVER;
PayPalAdvancedPayment *payment = [[[PayPalAdvancedPayment alloc] init] autorelease];
payment.paymentCurrency = @"AUD";

payment.receiverPaymentDetails = [NSMutableArray array];

NSArray *emails = [[NSArray alloc]initWithObjects:adminId,sellerId, nil];

for (int i = 0; i < emails.count; i++)
{
PayPalReceiverPaymentDetails *details = [[[PayPalReceiverPaymentDetails
alloc] init] autorelease];

details.invoiceData = [[[PayPalInvoiceData alloc] init] autorelease];

float adminAmount = [adminPercentage floatValue];
float sellerAmount = [totalAmount floatValue] - adminAmount;


switch (i) {
case 0:
// Admin commission
details.subTotal = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%f",adminAmount]];
details.description = @"Amount payed to Admin as a Commission";
details.merchantName = [NSString stringWithFormat:@"%@",ADMIN];
break;
case 1:
// Seller amount
details.invoiceData.totalShipping = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@",shippingCharges]];
details.subTotal = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%f",sellerAmount]];
details.description = @"Amount payed to Seller";
details.merchantName = [NSString stringWithFormat:@"%@ : %@",SELLER,@"Seller Name"];
break;
default:
break;
}

details.recipient = [emails objectAtIndex:i];
[payment.receiverPaymentDetails addObject:details];
}
[ppMEP advancedCheckoutWithPayment:payment];
[emails release];
}

但每次我尝试执行交易时,我都会遇到以下错误

    errorId: 580022
message: The receiver is based in a country that isn't enabled to receive payments

我的测试账户是为澳大利亚创建的。我的应用程序将仅在澳大利亚可用。

现在我的问题是1) 即使我的 iOS 应用进入生产环境,这有关系吗?2) 我们还可以使用上面链接中提供的 iOS SDK 还是我们需要使用最新的 SDK?

我看到了一些 links但我不清楚出了什么问题。

非常感谢任何形式的帮助。谢谢。

更新:

如果我使用美国测试账户,那么我的交易仍未完成。

- (void)paymentFailedWithCorrelationID:(NSString *)correlationID

上面的方法被调用,这里是响应

severity: None
category: Application
errorId: 0
message: None

这是截图

enter image description here

最佳答案

您可以切换到我们新的 iOS 移动支付库吗?旧库现已弃用,鼓励所有人使用新库。

https://developer.paypal.com/webapps/developer/docs/integration/mobile/ios-integration-guide/

关于ios6 - Paypal Sandbox 不适用于使用 Paypal iOS SDK 的非美国开发人员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15702860/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com