关于这个问题,感谢您缩小范围。但遗憾的是我必须配置这个委托
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
didSelectShippingMethod:(PKShippingMethod *)shippingMethod
completion:(void (^)(PKPaymentAuthorizationStatus, NSArray *summaryItems))completion
{
completion(PKPaymentAuthorizationStatusSuccess, [self summaryItemsForShippingMethod:shippingMethod]);
}
- (NSArray *)summaryItemsForShippingMethod:(PKShippingMethod *)shippingMethod
{
totalPrice = 5;
NSString *prices = [NSString stringWithFormat:@"%d",totalPrice];
NSDecimalNumber *num = [[NSDecimalNumber alloc] initWithString:prices];
PKPaymentSummaryItem *foodItem = [PKPaymentSummaryItem summaryItemWithLabel:@"Total Products Cost" amount:num];
NSDecimalNumber *total = [foodItem.amount decimalNumberByAdding:shippingMethod.amount];
PKPaymentSummaryItem *totalItem = [PKPaymentSummaryItem summaryItemWithLabel:@"Video Mantis Productions, INC." amount:total];
return @[foodItem, shippingMethod, totalItem];
}
为了向用户展示产品摘要的真正含义。可悲的是,我将PKPaymentSummaryItem *foodItem设为 nil,因此处理从未得到修复。请帮忙!先感谢您。