ApplePay iOS error connecting PKInAppPaymentService - com.apple.passd.in-app-payment - Failed to connect to the remote notification service

When I tried to integrate Apple Pay into my test application, I could not get the payment data sheet, although I followed all the instructions in Apple Getting Started with an Apple Pay document .

When requesting payment:

PKPaymentAuthorizationViewController *auth = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:paymentRequest];

I get two strange errors, with no Internet search results:

PKInAppPaymentService connection error: Domain error = NSCocoaErrorDomain Code = 4097 "Operation could not be completed. (Cocoa error 4097.)" (connection to the service with the name com.apple.passd.in-app-payment) UserInfo = 0x174273780 {NSDebugDescription = connection to a service named com.apple.passd.in-app-payment}

Failed to connect to Remote Message Viewer.

+5
source share
3 answers

After completing the four steps at Apple starting the doc, the solution is hidden, step 5:

Enable Apple Pay in your project settings on the Capabilities tab. This may be part of step 4 in the Apple doc, but the step that really worked was to verify the seller ID as shown in the screenshot below:

Enable Apple Pay - Screenshot

Edit: Also see the answer from @ChristopherJones if you still have problems.

(Make sure the seller you use with the payment request is exactly the same as the one in the Apple Pay features section. Remove the alphanumeric text at the beginning if you included it.)

After that, just create and run again.

+5
source

I had the same problem and the problem was to make sure your PKPaymentRequest merchantIdentifier matches exactly without a random number. In addition, you need to make sure that the same identifier is checked on the Capabilities tab.

 PKPaymentRequest *request = [PKPaymentRequest new]; request.merchantIdentifier = @"merchant.com.example"; 
+3
source

It can also happen if you subclass from PKPaymentRequest and submit your subclass to PKPaymentAuthorizationViewController

+1
source

Source: https://habr.com/ru/post/1205145/


All Articles