Hi, i was integrating apple pay web. I have used my sandbox test id, generated processing certificate and merchant certificate, and finished session.onvalidatemerchant this step with return merchantSession successfully. The current situation is :
For the MacOS safari, it continuously throw Payment Not Completed and can't trigger session.onpaymentmethodselected .
and when check event returned from session.oncancel. => {"isTrusted":true}
Can somebody guid me through it?
Note : I'm trying to check it on local machine and on staging server the same issue
I found the issue , Im parse the merchantSession at completeMerchantValidation with response key like ['response'=> merchantSession] , but it should parse it like
#backend side
curl from back end
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $validationURL);
curl_setopt($ch, CURLOPT_SSLCERT, $certificatePath);
curl_setopt($ch, CURLOPT_SSLKEY, $certificateKeyPath);
curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $appleCerPass);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data, true));
curl_setopt($ch, CURLOPT_VERBOSE, true);
$verbose = fopen('php://temp', 'w+');
curl_setopt($ch, CURLOPT_STDERR, $verbose);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
return json_decode($response, true);
parse it as is after json_decode ^_^
#frontend side
session.completeMerchantValidation(merchantSession);