设备上禁用了 Paypal MPL 登录按钮
Posted
技术标签:
【中文标题】设备上禁用了 Paypal MPL 登录按钮【英文标题】:Paypal MPL login button disabled on device 【发布时间】:2013-12-01 03:52:03 【问题描述】:我已经解决了几个类似问题的问题,但找不到任何解决方案。我已按照在沙盒模式下工作给出的步骤进行操作。在执行以下代码后,我得到了贝宝窗口。
[[PayPal getPayPalInst] checkoutWithPayment:payment];
在贝宝窗口中,我可以使用电子邮件和密码登录。它适用于模拟器,但在提供有效凭据后,设备登录按钮仍处于禁用状态。
提前致谢
我可以在那里运行演示示例。但是当我更改捆绑标识符并检查然后登录按钮在贝宝窗口中没有启用
现在我发现它对我的特定捆绑包标识符已禁用,因为当我使用不同的配置文件及其捆绑包标识符时它正在工作。
我们必须注册我们的包标识符吗?或任何特殊原因。
我使用的是 Paypal MPL 2.1.0 版。
【问题讨论】:
您是否从 apps.paypal.com 获得了自己的 appId ? @Praveen 不,我的应用在应用商店上线。我正在使用开发人员配置文件包标识符,但是当我更改并使用一些不同的配置文件时它的工作.. @Praveen 我正在使用沙盒模式 Paypal MPL 【参考方案1】:请仔细检查卖家账户“sunny.g-faciliator@intelgain.com”(receiverEmail) - 我猜应该是“sunny.g-facilitator@intelgain.com”(“facilitator”中缺少“t” "),这可能会导致问题。
【讨论】:
是的,你对那个错误是对的,但这不是问题。登录按钮保持禁用状态。而且我的有时也在工作,即登录按钮已启用,但大多数时候它被禁用 您好,我使用最新版本的 ios SDK 进行了快速测试,登录按钮工作正常。我可能会关注使用的电子邮件地址,您可以尝试使用不包含点的电子邮件地址登录吗? (例如 sanket@intelgain.com) 我使用的是 MPL 而不是 SDK,并且我使用了没有“.”的电子邮件 ID(例如 jagan@intelgain.com)。但问题存在。 @PayPal_Federica 我们面临同样的问题。我不认为它的电子邮件地址。相同的应用在模拟器上运行时运行良好,但在运行 iOS 7.0.4 的设备上禁用了支付按钮。【参考方案2】:-(void)ChainPayment
[PayPal getPayPalInst].shippingEnabled = TRUE;
//optional, set dynamicAmountUpdateEnabled to TRUE if you want to compute
//shipping and tax based on the user's 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];
【讨论】:
以上是关于设备上禁用了 Paypal MPL 登录按钮的主要内容,如果未能解决你的问题,请参考以下文章
使用 MPL Android 登录 paypal 并行支付时出错
禁用在 android 上显示 Paypal Web 浏览器
当按钮被禁用时,如何在 Apple Developer 网站上添加新设备以进行配置?
如何禁用 Android 上的设备后退按钮(react-native)?