• 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

    • This topic was modified 2 years, 4 months ago by Jan Dembowski.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘authentication error’ is closed to new replies.