authentication error
-
Hello Team,
]
when I click on Proceed on checkout, I do not see $encryptedPayload variable set in the URL. Kindly advise
//code to generate signature
$payload=json_encode($payload);
//$rsa= new \phpseclib\Crypt\RSA();
$rsa= new RSA();
$rsa->setHash(‘sha1’);
$rsa->setMGFHash(‘sha1’);
$rsa->setEncryptionMode(RSA::ENCRYPTION_OAEP);
$rsa->setPublicKeyFormat(RSA::PUBLIC_FORMAT_PKCS1);
$rsa->loadKey($publickey);
$encryptedPayload=base64_encode($rsa->encrypt($payload));
$signaturedata=”appID&merTradeNo=$merTradeNo$merTradeNo&payload=$encryptedPayload&paymentType=$paymentType”;
$sign=base64_encode(hash_hmac(‘sha512’,$signaturedata,$apiKey,true));$siteUrl=”https://transportation.local/wordpress/redirect”;
//initiate payment
return array(
‘result’ => ‘success’,
‘redirect’ => “https://transportation.local/wordpress/redirect?appID=$appID&merTradeNo=$merTradeNo&encryptedPayload=$encryptedPayload&paymentType=$paymentType&sign=$sign”,
);Kindly advise.
Thanks,
Roshan
- The topic ‘authentication error’ is closed to new replies.