1
我已经实施Apple Pay及Target 8.4及以上版本。iOS中的Apple付款按钮8.4
当设备具有ApplePay功能但未配置时,我们必须打开电子钱包应用程序并启动添加购物车的过程。
当我实现iOS 8.4的代码时,不显示PKPaymentButton。 它在iOS 9.0上工作正常。请检查下面的代码是否相同。
if ([PKPaymentAuthorizationViewController canMakePayments]) {
// Card configured
self.btnApplePay = [self.btnApplePay initWithPaymentButtonType:PKPaymentButtonTypePlain paymentButtonStyle:PKPaymentButtonStyleBlack];
}
else {
// Card not configured
self.btnApplePay = [PKPaymentButton buttonWithType:PKPaymentButtonTypeSetUp style:PKPaymentButtonStyleBlack];
}
此外,找到截图的附件。
请建议,在那里我需要改善我的代码。
您确定您正在测试iOS 8.4吗? 'PKPaymentButton'仅适用于iOS 8.4及更高版本。不支持iOS 8.3及更低版本。 – Mackarous
是的我选择了iPhone 5(8.4) – Myaaoonn