2

I just start to work with applepay, I'm trying to develop in local machine , I defined a merchantid, identifier, and all marked as verified in my apple developer account

I'm using ngrok to be able to get to my machine from outside- I'm able to get to this file .well-known/apple-developer-merchantid-domain-association.txt

But when I am using this request : curl https://apple-pay-gateway.apple.com/paymentservices/paymentSession -d 'const options= { url: "paymentSession url ", cert: "./applepay.cer", key: "./merchantid.cer", method: 'post', body:{ merchantIdentifier: "merchant.myDomin.com", displayName: "myDomin", initiative: "web", initiativeContext: "myDomin.myDomin.com" }, json: true, }' I get the error : EPROTO 4517103040:error:14094410:SSL routines:ssl3readbytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/s3_pkt.c:1494:SSL alert number 40

What am I doing wrong ? (The apple pay pop is showing during the flow , and I fail in session.onvalidatemerchant event

1 Answers1

0
curl -XPOST -H "Content-type: application/json" -d '{"merchantIdentifier":"merchant.***.xxxxx","displayName":"Test 
Pay","initiative":"web","initiativeContext":"***-***-xxxxxx.xxxxxxxxxx.xx"}' --cert cert.pem:cert.pem 
'https://apple-pay-gateway-cert.apple.com/paymentservices/startSession'

This is the valid curl request which I used to get session from the apple pay servers.

https://developer.apple.com/documentation/apple_pay_on_the_web/setting_up_your_server

please check whether all the server requirements are filled or not. As well as in node.js you need to specify the minimum TLS version. (In my case, I did it with the request).

refer my code: Unable to get any response from the apple pay - This resource came from a local override

If you have filled all the server requirements issue should be with your merchant Identity Certificate.

discussion - https://developer.apple.com/forums/thread/679789?login=true&page=1#674694022