gpt4 book ai didi

ios - Paypal 集成给出错误

转载 作者:太空宇宙 更新时间:2023-11-03 15:52:04 25 4
gpt4 key购买 nike

您好,我正在尝试集成 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];
}

最佳答案

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

关于ios - Paypal 集成给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23154107/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com