Nis*_*sha 1 crash paypal ios unrecognized-selector
嗨,我想整合Paypal服务,但它给出错误
错误:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '- [PayPalPaymentViewController payPalServiceManager]: unrecocnized selector sent to instance 0x12784450'
Run Code Online (Sandbox Code Playgroud)
代码:
- (IBAction)buttonPaypalAction:(id)sender
{
gateway = @"Paypal";
PayPalPayment *payment = [[PayPalPayment alloc] init];
payment.amount = [[NSDecimalNumber alloc] initWithString:[appDelegate.orderDetails objectAtIndex:6]];
payment.currencyCode = appDelegate.currencyCode;
payment.shortDescription = @"Food items";
if (!payment.processable) {
// This particular payment will always be processable. If, for
// example, the amount was negative or the shortDescription was
// empty, this payment wouldn't be processable, and you'd want
// to handle that here.
}
// Update payPalConfig re accepting credit cards.
// self.payPalConfig.acceptCreditCards = self.acceptCreditCards;
PayPalPaymentViewController *paymentViewController = [[PayPalPaymentViewController alloc] initWithPayment:payment configuration:self.payPalConfig delegate:self];
// error is coming after this line...
[self presentViewController:paymentViewController animated:YES completion:nil];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
856 次 |
| 最近记录: |