应用程序崩溃,崩溃的原因是
'没有代表设置?...你打算怎么回电?'
设置了PGTransactionViewController的委托。但它还没有调用委托方法。
PGTransactionViewController *txnController = [[PGTransactionViewController alloc]
initTransactionForOrder:pgOrder];
#if SERVER_PRODUCTION
txnController.serverType = eServerTypeProduction;
#else
txnController.serverType = eServerTypeStaging;
#endif
txnController.merchant = [PGMerchantConfiguration defaultConfiguration];
// Set the Delegates
txnController.delegate = self;
[self.hostViewController.navigationController pushViewController:txnController animated:YES];
该类是NSObject的子类。
答案 0 :(得分:0)
您使用的是这些委托方法吗?
- (void)didSucceedTransaction:(PGTransactionViewController *)controller
response:(NSDictionary *)response
{
DEBUGLOG(@"ViewController::didSucceedTransactionresponse= %@", response);
}
- (void)didFailTransaction:(PGTransactionViewController *)controller error:(NSError *)error response:(NSDictionary *)response
{
DEBUGLOG(@"ViewController::didFailTransaction error = %@ response= %@", error, response);
}
- (void)didCancelTransaction:(PGTransactionViewController *)controller error:(NSError*)error response:(NSDictionary *)response
{
DEBUGLOG(@"ViewController::didCancelTransaction error = %@ response= %@", error, response);
}
- (void)didFinishCASTransaction:(PGTransactionViewController *)controller response:(NSDictionary *)response
{
DEBUGLOG(@"ViewController::didFinishCASTransaction:response = %@", response);
}