We were try to call Apple Pay startSession, but we are getting an following error,
exception: Error: Error: socket hang up
at SCAwsPay.validateSessiont (D:\projects\amazon_payment_nodejs\routes\controllers\secondaryControllers\SCAwsPay.js:158:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async D:\projects\amazon_payment_nodejs\routes\awsPay.js:56:18,
const { merchantIdentifier, domainName, initiativeContext, initiative, displayName } = payload;
const httpsAgent = new https.Agent({
rejectUnauthorized: false,
cert: certificate,
key: key,
passphrase: 'team123'
});
const headers = {
'Content-Type': 'application/json',
};
let response = await axios.post("https://apple-pay-gateway.apple.com/paymentservices/startSession", {
merchantIdentifier,
domainName,
displayName,
}, {
// headers,
httpsAgent
});
I kindly request your support in resolving this issue as soon as possible. Apple Pay is an essential feature for me, and I would greatly appreciate any guidance or solutions you can provide.
Thank you for your attention to this matter. I look forward to your prompt response and assistance in resolving this issue.