STPTestPaymentAuthorizationViewController disabled
Closed this issue · 2 comments
Hello, I'm attempting to use STPTestPaymentAuthorizationViewController and when I do so, the Apple Pay screen when one selects the payment method, shipping, etc is disabled and I cannot select a different payment method. Also there is a spinner on top of the Pay button and I cannot place the order. Any ideas as to why this is happening? Thanks
When working with Apple Pay, most PKPaymentAuthorizationViewControllerDelegate
methods (such as paymentAuthorizationViewController:didSelectShippingAddress:completion:
include a completion
block as their third parameter. The idea is that you can go off to the network and, say, calculate new shipping methods/prices for that address, then call that completion
block when you're done. Until that completion
block is called though there will be a spinner obstructing you from paying. I'd suggest looking at the example apps in github.com/stripe/stripe-ios to see examples of this.
If you're still unable to get things to work after trying that, feel free to post your code and I'll try and help - it's not really possible to say what's going wrong with your app based on your description alone, so I'm sort of guessing here.
(facepalm)
Yep, that was it! Thanks for reaching out!