从CCAvenue重定向后,无法将特定值传递给成功页面

时间:2014-05-03 06:26:53

标签: php ccavenue

我正在将CCAvenue整合到一个用PHP开发的在线电影预订网站。我需要在成功付款后将特定值(如剧院名称,电影名称,座位号等)携带到重定向页面,因为票证生成需要数据。我在ccavenue的Checkout.php页面中使用下面的代码但是没有携带值。请帮忙。

<html>
<head>
<title> Checkout</title>
</head>
<body>
<center>
<?php include('adler32.php')?>
<?php include('Aes.php')?>
<?php 

error_reporting(0);

$merchant_id="xxxxxxxx";  // Merchant id(also User_Id) 
$amount="1";          // your script should substitute the amount here in the quotes    provided here
$order_id=uniqid();       //your script should substitute the order description here in  the quotes provided here
$url="xxx.com/files/redirecturl.php";         //your redirect URL where your customer  will be redirected after authorisation from CCAvenue
$billing_cust_name=$_POST['uname'];
$billing_cust_address=$_REQUEST['location'];
$billing_cust_tel=$_POST['mobno'];
$billing_cust_email=$_POST['email'];

$date=$_REQUEST['date'];
$seatno=$_REQUEST['seatno'];
$moviename=$_REQUEST['moviename'];
$theatre=$_REQUEST['theatre'];
$cost=$_REQUEST['cost'];



$working_key='xxxxxxxx';    //Put in the 32 bit alphanumeric key in the quotes provided here.


$checksum=getchecksum($merchant_id,$amount,$order_id,$url,$working_key); // Method to generate checksum

$merchant_data= 'Merchant_Id='.$merchant_id.'&Amount='.$amount.'&Order_Id='.$order_id.'&Redirect_Url='.$url.'&billing_cust_name='.$billing_cust_name.'&billing_cust_address='.$billing_cust_address.'&billing_cust_tel='.$billing_cust_tel.'&billing_cust_email='.$billing_cust_email.'&Checksum='.$checksum; // This value is carried forward to to the redirecturl.php page

$user_data='date='.$date.'&moviename='.$moviename.'&theatre='.$theatre.'&cost='.$cost; // This value is not carried forward to the redirecturl.php page


$encrypted_data=encrypt($merchant_data,$working_key); // Method for encrypting the data.

?>

<form method="post" name="redirect" action="http://www.ccavenue.com/shopzone/cc_details.jsp"> 
<?php
echo "<input type=hidden name=encRequest value=$encrypted_data>";
echo "<input type=hidden name=Merchant_Id value=$merchant_id>";
echo "<input type=hidden name=user_data value=$user_data>";
?>
</form>

</center>
<script language='javascript'>document.redirect.submit();</script>
</body>
</html>

1 个答案:

答案 0 :(得分:1)

您可以使用merchant_param1merchant_param2merchant_param3 .... merchant_param5参数传递自定义数据,每个参数最多100个字母数字字符。 PG将在处理后回复它。

来源:https://login.ccavenue.com/resources/integrationKit.do?command=navigateIntegrationKit

您需要登录凭据才能访问此部分。