gpt4 book ai didi

php - 安全错误。在 php 中使用 ccavenue 检测到非法访问

转载 作者:可可西里 更新时间:2023-11-01 00:39:00 25 4
gpt4 key购买 nike

我已成功重定向到 ccavenue 支付网关,但在单击取消按钮时,它在重定向 URL 页面中显示错误 “安全错误。检测到非法访问”

这是我的重定向页面:

<?php include('Aes.php');include('adler32.php')?>
<?php
$workingKey='myWorkingKey'; //Working Key should be provided here.
$encResponse=$_POST["encResponse"]; //This is the response sent by the CCAvenue Server


$rcvdString=decrypt($encResponse,$workingKey);
$AuthDesc="";
$MerchantId="";
$OrderId="";
$Amount=0;
$Checksum=0;
$veriChecksum=false;

$decryptValues=explode('&', $rcvdString);
$dataSize=sizeof($decryptValues);

echo "<center>";


for($i = 0; $i < $dataSize; $i++)
{
$information=explode('=',$decryptValues[$i]);
if($i==0) $MerchantId=$information[1];
if($i==1) $OrderId=$information[1];
if($i==2) $Amount=$information[1];
if($i==3) $AuthDesc=$information[1];
if($i==4) $Checksum=$information[1];
}

$rcvdString=$MerchantId.'|'.$OrderId.'|'.$Amount.'|'.$AuthDesc.'|'.$workingKey;
$veriChecksum=verifyChecksum(genchecksum($rcvdString), $Checksum);

if($veriChecksum==TRUE && $AuthDesc==="Y")
{
echo "<br>Thank you for shopping with us. Your credit card has been charged and your transaction is successful. We will be shipping your order to you soon.";

}
else if($veriChecksum==TRUE && $AuthDesc==="B")
{
echo "<br>Thank you for shopping with us.We will keep you posted regarding the status of your order through e-mail";


}
else if($veriChecksum==TRUE && $AuthDesc==="N")
{
echo "<br>Thank you for shopping with us.However,the transaction has been declined.";

}
else
{
echo "<br>Security Error. Illegal access detected";

}


echo "<br><br>";

echo "<table cellspacing=4 cellpadding=4>";
for($i = 0; $i < $dataSize; $i++)
{
$information=explode('=',$decryptValues[$i]);
echo '<tr><td>'.$information[0].'</td><td>'.$information[1].'</td></tr>';
}

echo "</table><br>";
echo "</center>";
?>

我用谷歌搜索了这个问题,但没有得到任何解决方案。如何解决这个错误..请给出一些关于相同的建议?

最佳答案

我从文档(可能已经过时但我找不到更新的文档)中发现您需要传递一个名为 cancel_url 的参数,如果客户取消账单页面上的交易。

因此,在您创建付款的页面中,您需要向表单中添加如下内容

<input type="hidden" id="cancel_url" name="cancel_url" value="the_url_where_you_will_proccess_canceled_orders">

您必须已经有类似 redirect_url 的内容

关于php - 安全错误。在 php 中使用 ccavenue 检测到非法访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56078132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com