I've also had to diagnose this error when working with Braintree and Apple Pay. Keep in mind telling me you use the Braintree framework doesn't quite tell the whole story as Braintree has two methods with which you can integrate Apple Pay, BTPaymentProvider
and PKPaymentRequest
. In my case, I encountered the error PKPaymentAuthorizationControllerExportedObject authorizationDidFinishWithError
while using PKPaymentRequest
. Specifically, it would crash on the second purchase, when everything worked fine with Apple Pay the first time it was used. Eventually, I traced it to the completion block:
completion(PKPaymentAuthorizationStatusSuccess);
In my case, removing the completion block call by commenting out the above code prevented this crash and restored the expected behavior, allowing Apple Pay to be successfully used without crashes.
It works better than blaming Eve, Adam or the snake for the Apple Pay, Braintree error. ;)