I have implemented apple pay in my iOS application using Passkit framework. I did all of these things fully to set up apple pay. I am using sandbox account. I added
There are still cases when you do have completion/handler properly called in PKPaymentAuthorizationViewControllerDelegate
functions that expect this handler, but your internal payment API happen to be set to a longer timeout time than ApplePay dialog expects (as of iOS 13 it would timeout in around 30 secs).
In these cases you may get "Apple pay not completed" error in slow networks (try to block your API artificially to simulate such a situation).
A solution might be in proactively dismissing the ApplePay dialog yourself just before it gives up and shows the error. More details on how to do this can be found in this answer to a similar question being discussed.