0

我正在将 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>
4

1 回答 1

1

merchant_param1您可以使用, merchant_param2, merchant_param3....参数传递自定义数据,merchant_param5每个参数最多包含 100 个字母数字字符。PG 将在处理后将其回显。

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

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

于 2014-05-06T10:22:48.267 回答