PKPaymentAuthorizationViewController-如何输入电子邮件&来自用户的ph号码?

时间:2016-03-21 18:30:51

标签: ios objective-c applepay

当我点击苹果付款时,PKPaymentAuthorizationViewController将会弹出,在这里我希望用户输入电子邮件和电话号码。怎么办呢?

1 个答案:

答案 0 :(得分:0)

以下代码可以正常使用:

 PKContact *contact = [[PKContact alloc] init];
  contact.emailAddress = @"";
  contact.phoneNumber = [CNPhoneNumber phoneNumberWithStringValue:@""];
  paymentRequest.billingContact = contact;
  paymentRequest.requiredShippingAddressFields = (PKAddressFieldPhone | PKAddressFieldEmail);