苹果付费-sslv3警报握手失败

时间:2020-11-08 13:05:42

标签: applepay applepayjs

我刚刚开始使用applepay, 我正在尝试在本地计算机上进行开发,我定义了一个商户编号,标识符,并在我的苹果开发人员帐户中将所有标记为已验证的

我正在使用ngrok能够从外部访问我的机器-我可以访问此文件 .well-known / apple-developer-merchantid-domain-association.txt

但是当我使用此请求时: curl https://apple-pay-gateway.apple.com/paymentservices/paymentSession -d'const options = { url:“ paymentSession url”, 证书:“ ./ applepay.cer”, 密钥:“ ./ merchantid.cer”, 方法:“发布”, 身体:{ BusinessmanIdentifier:“ merchant.myDomin.com”, displayName:“ myDomin”, 倡议:“网络”, InitiativeContext:“ myDomin.myDomin.com” }, json:是的, }' 我得到错误: EPROTO 4517103040:错误:14094410:SSL例程:ssl3readbytes:sslv3警报握手失败:../ deps / openssl / openssl / ssl / s3_pkt.c:1494:SSL警报编号40

我在做什么错? (在流程中显示了Apple Pay Pop,并且我在session.onvalidatemerchant事件中失败

1 个答案:

答案 0 :(得分: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'

这是我用来从 Apple Pay 服务器获取会话的有效 curl 请求。

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

请检查是否满足所有服务器要求。与 node.js 一样,您需要指定最低 TLS 版本。 (就我而言,我是根据请求完成的)。

参考我的代码:Unable to get any response from the apple pay - This resource came from a local override

如果您填写了所有服务器要求,问题应该是您的商家身份证书。

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