I am getting the following error on payfort checkout page
Failed! Error code: 00006 Error Message: Technical problem
My access_code, merchant_identifier and SHA_Request_Phrase are fine (not present in code).
The code I wrote:
<?php
$shaString = '';
$amount = 1000;
// array request
$arrData = array(
'command' => 'AUTHORIZATION',
'access_code' => $access_code,
'merchant_identifier' => $merchant_identifier,
'merchant_reference' => 'Test010',
'amount' => $amount,
'currency' => 'AED',
'language' => 'en',
'customer_email' => '[email protected]',
'order_description' => 'iPhone 6-S',
);
// sort an array by key
ksort($arrData);
foreach ($arrData as $key => $value) {
$shaString .= "$key=$value";
}
$shaString = $requestPhrase . $shaString . $requestPhrase;
$signature = hash("sha256", $shaString);
echo "Signature >>>>>>>>>>>>>>>>>>>>>>>>>>>> $signature";
$requestParams['signature'] = $signature;
$redirectUrl = 'https://sbcheckout.payfort.com/FortAPI/paymentPage';
// Output the HTML form
echo "<html xmlns='https://www.w3.org/1999/xhtml'>\n<head></head>\n<body>\n";
echo "<form action='$redirectUrl' method='post' name='frm'>\n";
foreach ($requestParams as $a => $b) {
echo "\t<input type='hidden' name='" . htmlentities($a) . "' value='" . htmlentities($b) . "'>\n";
}
echo "\t<script type='text/javascript'>\n";
echo "\t\tdocument.frm.submit();\n";
echo "\t</script>\n";
echo "</form>\n</body>\n</html>";
?>
I have tried reaching out to their support but havent worked at all.