TL;DR: How do I remove shipping methods for invalid shipping addresses?
Here's the scenario:
1. PKPaymentAuthorizationViewController is presented, the default address is valid and shipping methods are calculated via an API and set via the
paymentAuthorizationViewController:didSelectShippingContact:completion: delegate method.
2. The users selects a new but invalid address rendering the current array of shipping methods invalid as well (we cannot calculate shipping rates for the invalid address, for example, a missing zip code or city)
3. We return PKPaymentAuthorizationStatusInvalidShippingPostalAddress in the completion block along with nil for the array of shipping methods, assuming it'll remove the already displayed shipping methods from the previously valid address in 1:
completion(PKPaymentAuthorizationStatusInvalidShippingPostalAddress, nil, [self summaryItemsForCart]);4. The shipping methods for the initial address still appear, and could potentially be vastly different in price that the new (albeit incorrect) address
Now, it's not a huge deal since the user cannot continue with the transaction, but I think it would be nice to remove those addresses. I have also tried returning an empty array and an array with a dummy PKShippingMethod that doesn't contain any information to properly display a shipping method.
Any ideas?