ApplePay Marchant Validation PHP Issue

I am facing an issue but not really know what I have to do next because I am new to the apple pay web. I am trying to integrate the apple pay web. Here is my PHP source code.

Code Block
public function apwMerchantValidation($validation_url){
\backend\modules\EventsLog\models\EventsLog::Log("apw validation url " . $validation_url . "");
if("https" == parse_url($validation_url, PHP_URL_SCHEME) && substr(parse_url($validation_url, PHP_URL_HOST), -10 ) == ".apple.com"){
$apw_merchant_identifier = PaymentHelper::paymentInfo('apw_merchant_identifier');
$apw_domain_name = PaymentHelper::paymentInfo('apw_domain_name');
$apw_display_name = PaymentHelper::paymentInfo('apw_display_name');
$apw_certificate_path = PaymentHelper::paymentInfo('apw_certificate_path');
$apw_certificate_key = PaymentHelper::paymentInfo('apw_certificate_key');
$apw_certificate_key_pass = PaymentHelper::paymentInfo('apw_certificate_key_pass');
$ch = curl_init();
$data = '{"merchantIdentifier":"'.$apw_merchant_identifier.'", "domainName":"'.$apw_domain_name.'", "displayName":"'.$apw_display_name.'"}';
curl_setopt($ch, CURLOPT_URL, $validation_url);
curl_setopt($ch, CURLOPT_SSLCERT, $apw_certificate_path);
curl_setopt($ch, CURLOPT_SSLKEY, $apw_certificate_key);
curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $apw_certificate_key_pass);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
if(curl_exec($ch) === false)
{
\backend\modules\EventsLog\models\EventsLog::Log("apw merchant valildation => " . curl_error($ch) . "");
}
curl_close($ch);
}else{
\backend\modules\EventsLog\models\EventsLog::Log("apw merchant valildation url issue ");
}
}


Here is the error that I am getting after this curl code executes.



apw merchant valildation => could not load PEM client certificate, OpenSSL error error:02001002:system library:fopen:No such file or directory, (no key found, wrong pass phrase, or wrong file format?)







Issue fixed. The issue was relative path and permissions.
ApplePay Marchant Validation PHP Issue
 
 
Q