I am integrating Apple Pay using PKPaymentAuthorizationViewController and its delegate methods. When user changes the Address the below delegate method gets triggered:
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingContact:(PKContact *)contact completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> *shippingMethods, NSArray<PKPaymentSummaryItem *> *summaryItems))completion
When I try to access the Phone number from 'contact' it is always empty also the name (given name, family name, etc.) are also empty. But the selected shipping contact has all the information like name, phone number, postal address.
PKPaymentRequest *pkPaymentRequest = [[PKPaymentRequest alloc] init];
pkPaymentRequest.merchantIdentifier = merchantId;
pkPaymentRequest.supportedNetworks = @[PKPaymentNetworkAmex, PKPaymentNetworkMasterCard, PKPaymentNetworkVisa, PKPaymentNetworkDiscover];
pkPaymentRequest.merchantCapabilities = PKMerchantCapability3DS;
pkPaymentRequest.countryCode = @"US";
pkPaymentRequest.currencyCode = @"USD";
pkPaymentRequest.requiredShippingContactFields = [NSSet setWithArray:@[PKContactFieldPostalAddress, PKContactFieldName, PKContactFieldPhoneNumber]];
This is address I have been using for now:
Find the debugging info in below screenshots which shows the PKContact object 'contact' is missing the required information.