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?
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?
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.
© 2022 - 2024 — McMap. All rights reserved.