CC 大道新 api 请求处理程序在 ec2 linux 实例上的 php 中没有响应
CC avenue new api request handler not responding in php on ec2 linux instance
签出 URL 后,我将使用以下代码重定向到 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>
运行 cc avenue on ec2
你需要安装下面的扩展将支持 mcrypt
安装步骤
1) 使用用户登录 ssh,例如 ec2-user(根据您的图片可能是另一个用户)
2) 运行 命令以 root 命令登录:- sudo -s
3) 使用命令安装 mcrypt :- yum install php-mcrypt
4) 重启应用程序。
签出 URL 后,我将使用以下代码重定向到 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>
运行 cc avenue on ec2
你需要安装下面的扩展将支持 mcrypt
安装步骤
1) 使用用户登录 ssh,例如 ec2-user(根据您的图片可能是另一个用户)
2) 运行 命令以 root 命令登录:- sudo -s
3) 使用命令安装 mcrypt :- yum install php-mcrypt
4) 重启应用程序。