1

当我单击我的buyMore按钮时,编写下面的代码,如下面的zooz示例代码中所写,

-(IBAction)buyMore
{
    ZooZ * zooz = [ZooZ sharedInstance];
    zooz.sandbox = YES;

    zooz.tintColor = [UIColor colorWithRed:1 green:0.8 blue:0 alpha:1];

    zooz.barButtonTintColor = [UIColor darkGrayColor];

    ZooZPaymentRequest * req = [zooz createPaymentRequestWithTotal:12.1 invoiceRefNumber:@"test invoice ref-1234" delegate:self];

    req.currencyCode = @"EUR";

    req.payerDetails.firstName = @"Some";

    req.payerDetails.email = @"test@zooz.com";

    req.payerDetails.address.zip=@"01234";

    req.requireAddress = NO;

    ZooZInvoiceItem * item = [[[ZooZInvoiceItem alloc] initWithPrice:12.1 quantity:1 name:@"T-Shirt"] autorelease];//Don't forget to release/autorelease

    item.itemId = @"refId-12345678"; // optional

    [req addItem:item];

    [zooz openPayment:req forAppKey:@"951bde04-5a26-4200-a94e-34d775a1e5f9"];

}

我收到错误说...

由于未捕获的异常 NSUnknownKeyException 导致应用程序终止,原因:[ setValue:forUndefinedKey:]:此类与键 pageControl 的键值编码不兼容。

首先抛出调用堆栈:

(0x1966052 0x1d4fd0a 0x1965f11 0x134c032 0x12bdf7b 0x12bdeeb 0x12d8d60 0xbcb91a 0x1967e1a 0x18d1821 0xbca46e 0xa71e2c 0xa723a9 0xa725cb 0xa72941 0xa8447d 0xa8466f 0xa8493b 0xa853df 0xa85561 0xba14ca 0x9eb301 0x1967e72 0x8cb92d 0x8d5827 0x85bfa7 0x85dea6 0x8e930c 0x9bd530 0x193a9ce 0x18d1670 0x189d4f6 0x189cdb4 0x189cccb 0x215b879 0x215b93e 0x9aca9b 0x29aa 0x28f5)

终止称为抛出异常程序以退出代码结束:0

4

3 回答 3

0
 I think there is a problem into your XIB file.

Look into XIB file, have you connect any control named 'pageControl' which is not declare into .h file.

于 2012-07-03T09:10:04.990 回答
0

请右键单击文件所有者并检查您是否收到任何连接插座的黄色警告,如果是,则将其删除

于 2012-07-03T09:16:31.950 回答
0

请参考Zooz Secure In app payment runtime error。您需要遵循 ZooZ pdf 文档中的确切说明。我猜您忘记将 -ObjC 添加到“其他链接器标志”中。

于 2013-08-16T08:15:51.057 回答