Apple Pay error using PKPaymentAuthorizationControllerExportedObject authorizationDidFinishWithError

When I use Apple Pay using the IATA SDK, does it crash after the next method after payment?

-[PKPaymentAuthorizationControllerExportedObject authorizationDidFinishWithError:] + 76 

What am I doing wrong?

+7
ios stripe-payments applepay passkit
source share
2 answers

I had the same accident. The Apple board will work for the first time, but on the second attempt, we would crash and could play it every time. The problem is that in the didAuthorizePayment delegate didAuthorizePayment I did all the backend processing, and when it was successful, I called the completion block with completion(PKPaymentAuthorizationStatus.Success) and then rejected the view controller.

Instead, I moved the rejection code from the didAuthorizePayment method to the 'didFinish' method (which required me to hold some state to go to the receive page). As soon as I did this, the "done" button was shown on the Apple payment controller, and the crashes disappeared.

+3
source share

Yes, we saw a similar problem in our crash logs, but didn't take any action.

 Thread : Crashed: com.apple.NSXPCConnection.user.582 0 libobjc.A.dylib 0x37736f46 objc_msgSend + 5 1 PassKit 0x2bee63a5 -[PKPaymentAuthorizationControllerExportedObject authorizationDidFinishWithError:] + 56 2 Foundation 0x29e23897 message_handler + 362 3 libxpc.dylib 0x37e14845 _xpc_connection_call_event_handler + 40 4 libxpc.dylib 0x37e12d39 _xpc_connection_mach_event + 1208 5 libdispatch.dylib 0x37ca334b _dispatch_mach_cancel_invoke + 38 6 libdispatch.dylib 0x37c978bf _dispatch_mach_invoke + 382 7 libdispatch.dylib 0x37c9d397 _dispatch_queue_drain + 554 8 libdispatch.dylib 0x37c97aad _dispatch_queue_invoke + 84 9 libdispatch.dylib 0x37c9ef9f _dispatch_root_queue_drain + 394 10 libdispatch.dylib 0x37ca03c3 _dispatch_worker_thread3 + 94 11 libsystem_pthread.dylib 0x37dfcdc1 _pthread_wqthread + 668 
+1
source share

All Articles