问题
In my iOS app , I have integrated the adaptive payment using paypal sdk from https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index
After paypal changed their site , I am not able to perform transaction using above library.
Here is my code
-(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];
}
But everytime I try to perform the transaction , I get below error
errorId: 580022
message: The receiver is based in a country that isn't enabled to receive payments
My test accounts are created for Australia. My app will be available ONLY in Australia.
Now my question is 1) Does it matter even if my iOS app went in Production ? 2) Also can we use the iOS SDK given in above link or do we need to use latest SDK ?
I saw some links but I am not clear what's going wrong.
Any kind of help is highly appreciated. Thanks.
UPDATE:
If I use US test accounts then still my transaction is not completed.
- (void)paymentFailedWithCorrelationID:(NSString *)correlationID
Above method gets called & here is the response
severity: None
category: Application
errorId: 0
message: None
Here is a screenshot

回答1:
can you switch over to our new Mobile Payment library for iOS? The old one is now deprecated and everyone is being encouraged to use the new library.
https://developer.paypal.com/webapps/developer/docs/integration/mobile/ios-integration-guide/
来源:https://stackoverflow.com/questions/15702860/paypal-sandbox-is-not-working-for-non-us-developers-using-paypal-ios-sdk