ApplePay using JS server

Hey guys! Did anyone tried to do server part of ApplePay implementation, using JS (Node\Express...)? I think I'm stuck with merchant validation part..Some problems with SSL connection
Or anyone, who pass this step with validation: what did you do to make "handshake" with validatioURL, which was provided by ApplePay?

Replies

I did mine in Java, but you probably are at a point where you need to make the HTTPS request POST and attach a cert to it

Yeah, exactly! How did you do it via Java? Could you please tell me?

I am doing a similar implementation. I send the post, but I'm uncertain what is expected for the cert? I'm using python requests on the server side and if I try to just send the .cer file the library chokes.


The closest I got to a real response was when I exported the cert from my mac as .p12, converted it to .pem and uploaded it to the server.

    response = requests.post(validationURL, data=data,
                             cert='merchant_id_20180904.pem')


However, that yeilds me this:

Starting new HTTPS connection (1): apple-pay-gateway-cert.apple.com
POST /paymentservices/startSession HTTP/1.1" 500 73
{
  "statusMessage": "Error processing request.",
  "statusCode": "500"
}


How should I be exporting my cert and attaching it to the request? A 500 sounds like a problem at Apple.