Apple Pay crash with on PKPaymentAuthorizationControllerExportedObject authorizationDidFinishWithError
Asked Answered
S

1

6

When I use Apple Pay with Stripe's iOS SDK, it crashes on following method after payment?

-[PKPaymentAuthorizationControllerExportedObject authorizationDidFinishWithError:] + 76

What am I doing wrong?

Seaquake answered 25/4, 2015 at 17:13 Comment(1)
If you are really just interested to know if others have the same problem as you, instead of finding a solution, the Stack Overflow is not the site to post your question. Assuming improper statement of your question I changed it so it is appropriate here.Mariomariology
S
3

I had the same crash. Apple pay would work the first time but on the second try we would get the crash and could reproduce it every time. The problem is that in the delegate method didAuthorizePayment I was doing all the backend processing and when that was successful I was calling the completion block with completion(PKPaymentAuthorizationStatus.Success) and then dismissing the view controller.

Instead I moved the dismiss code from the didAuthorizePayment method to the 'didFinish' method (which required me to hold onto some state to pass to the receipt page). Once I did that the done button was shown on the apple pay controller and the crashes went away.

Sanskritic answered 1/6, 2015 at 23:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.