结帐后我使用以下代码重定向ccavRequestHandler.php
的网址。一旦我在结帐后重定向它显示空白页面。
使用工作密钥激活站点的URL,访问cc途径设置页面中的代码。但我仍然无法解决问题。请提供一些更好的解决方案。
<html>
<head>
<title> Custom Form Kit </title>
</head>
<body>
<center>
<?php include('Crypto.php')?>
<?php
error_reporting(0);
$merchant_data='';
$merchant_id=$_POST['merchant_id'];
$order_id=$_POST['order_id'];
$amount=$_POST['amount'];
$currency=$_POST['currency'];
$redirect_url=$_POST['redirect_url'];
$cancel_url=$_POST['cancel_url'];
$language=$_POST['language'];
$working_key='123abc';//here i have entered cc avenue provided key
$access_code='WERT7CVN';//here i have entered cc avenue access code
$merchant_data='merchant_id='.$merchant_id.'&order_id='.$order_id.
'&amount='.$amount.'¤cy='.$currency.
'&redirect_url='.$redirect_url.'&cancel_url='.$cancel_url.
'&language='.$language;
foreach ($merchant_data as $key => $value){
$merchant_data.=$key.'='.urlencode($value).'&';
}
$encrypted_data=encrypt($merchant_data,$working_key); // Method for encrypting the data.
?>
<form method="post" name="redirect" action="https://secure.ccavenue.com/transaction/transaction.do?command=initiateTransaction">
<?php
echo "<input type=hidden name=encRequest value=$command>";
echo "<input type=hidden name=encRequest value=$encrypted_data>";
echo "<input type=hidden name=access_code value=$access_code>";
?>
</form>
</center>
<script language='javascript'>document.redirect.submit();</script>
</body>
</html>
答案 0 :(得分:4)
要在ec2
上运行cc avenue,您需要安装以下扩展名才能支持mcrypt
安装步骤
1)用户例如ec2-user登录ssh(根据你的图像可能是另一个)
2)运行命令以root命令登录: - sudo -s
3)使用命令安装mcrypt: - yum install php-mcrypt
4)重启appache。