私の iOS アプリでは、https: //www.x.com/developers/paypal/documentation-tools/paypal-sdk-index からのペイパル 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 アプリが Production になったとしても問題ですか? 2) また、上記のリンクにある iOS SDK を使用できますか、それとも最新の SDK を使用する必要がありますか?
いくつかのリンクを見ましたが、何が問題なのかわかりません。
どんな種類の助けも大歓迎です。ありがとう。
アップデート:
米国のテスト アカウントを使用しても、トランザクションは完了しません。
- (void)paymentFailedWithCorrelationID:(NSString *)correlationID
上記のメソッドが呼び出され、ここに応答があります
severity: None
category: Application
errorId: 0
message: None
ここにスクリーンショットがあります