Paypal集成给出错误

时间:2014-04-18 12:25:41

标签: ios paypal crash unrecognized-selector

您好我正在尝试整合Paypal服务,但它给出错误

错误:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-   [PayPalPaymentViewController payPalServiceManager]: unrecocnized selector sent to instance 0x12784450'

代码:

- (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];
}

1 个答案:

答案 0 :(得分:7)

不要忘记在其他链接器标志中添加-lc ++ -ObjC