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

标签 ios6 paypal payment-gateway paypal-sandbox paypal-adaptive-payments

在我的 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/

相关文章:

ios - 如何获取 Facebook 用户的已验证状态

api - 第三方权限 用户名 Paypal API Magento

php - 我们如何知道在印度 Ccavenue 支付网关中支付是否成功

Magento:paypal 标准付款在付款完成后不会重定向到 Magento 成功页面

ios6 - iOS Autolayout 按比例调整 UIViews 的大小?

iOS 7 联系人号码空格不是空格

c# - 奇怪的 paypal api 问题

php - 在magento中获取cc_type值

iphone - 了解发生了什么以及为什么需要 TableView 的委托(delegate)和源

php - 建议使用 paypal 的定期付款方式