Apple Pay for the Web: Merchant Validation Error

I am trying to integrate Apple Pay into a .Net Core 2.2 solution and am running into an issue with the Merchant Id Certificate.


I receive the following error when attempting to create the Apple Pay Merchant session:

--

The SSL connection could not be established

The remote certificate is invalid according to the validation procedure.

--


These are the steps I've followed to create the and install the certificate.

1) Create CSR (RSA/2048)

2) Create Apple Pay Merchant Identity Certificate and download .cer file

3) Import the file into the Keychain Access (states in Keychain Access that certificate is valid)

4) Export the certificate and private key together as p12

5) Import the p12 into the Windows machine (local computer/personal/certificates)


The error is thrown when posting to the Validation Url with the JSON payload (merchantIdentifier, domainName, displayName).


Now if I include code to ignore the certificate error, the Apple Pay merchant session is returned successfully.


It appears that there is something wrong with the certificate itself. Why is the certificate not considered valid?


Lastly, are there any issues if I moved forward with ignoring the certificate error?


Thanks,

Scott

Replies

Is see that you have RSA/2048 as your key and size. Did the developer portal throw an error because this was not Elliptic Curve?

<https://help.apple.com/developer-account/#/devbfa00fef7?sub=dev17ad0bdc0>


Try this if possible; try running your request again from your machine that contains your keychain where you exported the p12 from. I am wondering if you cannot create a chain of trust to the WWDR intermediate certificate and the Apple Root CA - G2.

<https://developer.apple.com/library/archive/ApplePay_Guide/Configuration.html>



Matt Eaton

DTS Engineering, CoreOS

meaton3 at apple.com