Paypal MPL Login Button Disabled on Device

I asked a few questions with a similar problem, but could not find a solution for this. I followed the following steps made in sandbox mode. After the following code, I get a PayPal window.

[[PayPal getPayPalInst] checkoutWithPayment:payment]; 

In the PayPal window, I can log in using my email and password. which works on the simulator, but on the deviceโ€™s registration button remains disabled after providing valid credentials.

enter image description here

Thank you in advance

I can run a demo. but when I change the package identifier and check, the login button does not turn on in the PayPal window.

Now I found out that it is disabled for my specific package ID when I use a different profile with its package ID, which it works.

Do I need to register our package ID? or any specific reason.

I am using Paypal MPL version 2.1.0.

+6
source share
2 answers

Please double check the sellerโ€™s account " sunny.g-faciliator@intelgain.com " (receiverEmail). I think it should be " sunny.g-facilitator@intelgain.com " ("t" is not in the "facilitator" "), and this may cause a problem.

0
source
 -(void)ChainPayment { [PayPal getPayPalInst].shippingEnabled = TRUE; //optional, set dynamicAmountUpdateEnabled to TRUE if you want to compute //shipping and tax based on the user address choice, default: FALSE [PayPal getPayPalInst].dynamicAmountUpdateEnabled = FALSE; //optional, choose who pays the fee, default: FEEPAYER_EACHRECEIVER [PayPal getPayPalInst].feePayer = FEEPAYER_EACHRECEIVER; //for a payment with multiple recipients, use a PayPalAdvancedPayment object PayPalAdvancedPayment *payment = [[PayPalAdvancedPayment alloc] init] ; payment.paymentCurrency = @"USD"; //receiverPaymentDetails is a list of PPReceiverPaymentDetails objects payment.receiverPaymentDetails = [NSMutableArray array]; //NSArray *nameArray = [NSArray arrayWithObjects:@"Frank's", @"Robert's", @"Julie's",nil]; for (int i = 1; i <= 2; i++) { PayPalReceiverPaymentDetails *details = [[PayPalReceiverPaymentDetails alloc] init]; details.description = @"Bear Components"; if(i==1) { details.recipient =[[[_emailDictionary valueForKey:@"secondary"] valueForKey:@"1"] valueForKey:@"email"];//[NSString stringWithFormat:@"example-merchant-% d@paypal.com ", 4 - i]; } if(i==2) { details.recipient =[[_emailDictionary valueForKey:@"primary"] valueForKey:@"email"];// [NSString stringWithFormat:@"example-merchant-% d@paypal.com ", 4 - i]; } details.merchantName = [NSString stringWithFormat:@"merchant name"]; /*unsigned long long order, tax, shipping; order = i * 100; tax = 0.0; shipping =0.0; primary = { email = "m, b@rew.com "; "first_name" = aj; "last_name" = Shar; plan = Free; "profit_percent" = 68; "reffer_from" = "<null>"; }; secondary = { 1 = { email = " pushnd@gmail.com "; "profit_percent" = 32; }; }; } //subtotal of all items for this recipient, without tax and shipping details.subTotal = [NSDecimalNumber decimalNumberWithMantissa:order exponent:-2 isNegative:FALSE]; //invoiceData is a PayPalInvoiceData object which contains tax, shipping, and a list of PayPalInvoiceItem objects details.invoiceData = [[PayPalInvoiceData alloc] init]; details.invoiceData.totalShipping = [NSDecimalNumber decimalNumberWithMantissa:shipping exponent:-2 isNegative:FALSE]; details.invoiceData.totalTax = [NSDecimalNumber decimalNumberWithMantissa:tax exponent:-2 isNegative:FALSE]; //invoiceItems is a list of PayPalInvoiceItem objects //NOTE: sum of totalPrice for all items must equal details.subTotal //NOTE: example only shows a single item, but you can have more than one details.invoiceData.invoiceItems = [NSMutableArray array]; PayPalInvoiceItem *item = [[PayPalInvoiceItem alloc] init]; NSDecimalNumber *number = [NSDecimalNumber decimalNumberWithString:_price]; details.subTotal=number; item.totalPrice = details.subTotal; item.name = @"Audio"; [details.invoiceData.invoiceItems addObject:item];*/ //the only difference between setting up a chained payment and setting //up a parallel payment is that the chained payment must have a single //primary receiver. the subTotal + totalTax + totalShipping of the //primary receiver must be greater than or equal to the sum of //payments being made to all other receivers, because the payment is //being made to the primary receiver, then the secondary receivers are //paid by the primary receiver. if (i == 2) { details.isPrimary = TRUE; details.merchantName = [NSString stringWithFormat:@"mercahnt name or app name"]; NSDecimalNumber *number = [NSDecimalNumber decimalNumberWithString:_price]; details.subTotal=number; } else { float secondaryPrice=[_price floatValue]; secondaryPrice=(secondaryPrice*[[[[_emailDictionary valueForKey:@"secondary"] valueForKey:@"1"] valueForKey:@"profit_percent"] integerValue])/100; NSNumberFormatter *fmt = [[NSNumberFormatter alloc] init]; [fmt setMaximumFractionDigits:2]; NSString *stringPrice=[fmt stringFromNumber:[NSNumber numberWithFloat:secondaryPrice]]; NSDecimalNumber *number = [NSDecimalNumber decimalNumberWithString:stringPrice]; details.subTotal=number; } [payment.receiverPaymentDetails addObject:details]; } [[PayPal getPayPalInst] advancedCheckoutWithPayment:payment]; } 
0
source

Source: https://habr.com/ru/post/958284/


All Articles