cc avenue php集成不起作用

cc avenue php集成不起作用,php,payment-gateway,ccavenue,Php,Payment Gateway,Ccavenue,我正在使用CCAVINE php集成演示文件。当我填写商户id和32位工作密钥并提交数据时,没有响应返回。只有空白页带有下面的url 我无法理解集成到底出了什么问题 以下是我正在填写的表格的代码: <form method="post" action="checkout.php"> <table> <tr> <td>Merchant Id : </td><td><inp

我正在使用CCAVINE php集成演示文件。当我填写商户id和32位工作密钥并提交数据时,没有响应返回。只有空白页带有下面的url

我无法理解集成到底出了什么问题

以下是我正在填写的表格的代码:

<form method="post" action="checkout.php">
    <table>
        <tr>
            <td>Merchant Id : </td><td><input type="text" name="Merchant_Id" value=""></td>
        </tr>
        <tr>
            <td>Amount : </td><td><input type="text" name="Amount" value="10.00"></td>
        </tr>
        <tr>
            <td>Order Id : </td><td><input type="text" name="Order_Id" value="test_r1234"></td>
        </tr>
        <tr>
            <td>Redirect URL : </td><td><input type="text" name="Redirect_Url" value="redirect.php"></td>
        </tr>

        The Billing details of the customer have to be mandatorily sent via the below mentioned parameters. Please note this has to be authentic data else the transaction would be rejected by the risk team.

        <tr>
            <td>Bill Name : </td><td><input type="text" name="billing_cust_name" value="sachin tyagi"></td>
        </tr>
        <tr>
            <td>Bill Address : </td><td><input type="text" name="billing_cust_address" value="sector 20- g158 , noida"></td>
        </tr>
        <tr>
            <td>Bill Country : </td><td><input type="text" name="billing_cust_country" value="india"></td>
        </tr>
        <tr>
            <td>Bill State : </td><td><input type="text" name="billing_cust_state" value="UP"></td>
        </tr>
        <tr>
            <td>Bill City : </td><td><input type="text" name="billing_city" value="Noida"></td>
        </tr>
        <tr>
            <td>Bill Zip : </td><td><input type="text" name="billing_zip" value="201301"></td>
        </tr>
        <tr>
            <td>Bill Tel : </td><td><input type="text" name="billing_cust_tel" value="08826483709"></td>
        </tr>
        <tr>
            <td>Bill Email : </td><td><input type="text" name="billing_cust_email" value="sachin.tyagi@flashonmind.com"></td>
        </tr>
        <tr>
            <td>Ship Name : </td><td><input type="text" name="delivery_cust_name" value="sachin tyagi"></td>
        </tr>
        <tr>
            <td>Ship Address : </td><td><input type="text" name="delivery_cust_address" value="sector 20- g158 , noida"></td>
        </tr>
        <tr>
            <td>Ship Country : </td><td><input type="text" name="delivery_cust_country" value="India"></td>
        </tr>
        <tr>
            <td>Ship State : </td><td><input type="text" name="delivery_cust_state" value="UP"></td>
        </tr>
        <tr>
            <td>delivery city : </td><td><input type="text" name="delivery_city" value="Noida"></td>
        </tr>
        <tr>
            <td>Ship Zip : </td><td><input type="text" name="delivery_zip" value="201301"></td>
        </tr>
        <tr>
            <td>Ship Tel : </td><td><input type="text" name="delivery_cust_tel" value="08826483709"></td>
        </tr>
        <tr>
            <td>Delivery Notes : </td><td><input type="text" name="delivery_cust_notes" value="test Notes"></td>
        </tr>
         <tr>
            <td>PayType: [dummy values, please contact service@ccavenue.com for actual bank short codes]: </td><td><input type="text" name="payType" value=""></td>
        </tr>
        <tr>
            <td>Billing Page Heading : </td><td><input type="text" name="billingPageHeading" value=""></td>
        </tr>

        <tr>
            <td colspan='2' align='center'>
                <INPUT TYPE="submit" value="submit">
            </td>
        </tr>
    </table>
</form>

商户Id:
数量:
订单编号:
重定向URL:
必须通过以下参数强制发送客户的账单详细信息。请注意,这必须是真实的数据,否则交易将被风险团队拒绝。
票据名称:
帐单地址:
法案国家:
法案规定:
比尔市:
比尔·齐普:
比尔电话:
帐单电邮:
船名:
船舶地址:
船籍国:
船国:
交货城市:
发货邮政编码:
船舶电话:
送货单:
PayType:[虚拟值,请联系service@ccavenue.com对于实际银行短代码]:
账单页面标题:

用于集成CCAVENTE支付网关的PHP脚本

CCavenue是印度最受欢迎的在线购物支付网关。它通过使用您的银行的国际信用卡(与CCAVINE有担保)在线账户或使用其借记卡(ATM卡)进行支付。它是为网上商店提供资金的最安全的地方之一

要将其与您的网站集成,您应该拥有CCAVENTE帐户,他们会为您提供一个商户id和一个对货币交易最重要的站点唯一密钥

Php函数的Require用于验证CCAVENTE付款的Require值

它通常需要2个文件,如

文件#1:ccavenueValidate.php

<?php

    function getCheckSum($MerchantId,$Amount,$OrderId ,$URL,$WorkingKey)
    {
        $str ="$MerchantId|$OrderId|$Amount|$URL|$WorkingKey";
        $adler = 1;
        $adler = adler32($adler,$str);
        return $adler;
    }

    function verifyCheckSum($MerchantId,$OrderId,$Amount,$AuthDesc,$CheckSum,$WorkingKey)
    {
        $str = "$MerchantId|$OrderId|$Amount|$AuthDesc|$WorkingKey";
        $adler = 1;
        $adler = adler32($adler,$str);

        if($adler == $CheckSum)
            return "true" ;
        else
            return "false" ;
    }

    function adler32($adler , $str)
    {
        $BASE =  65521 ;

        $s1 = $adler & 0xffff ;
        $s2 = ($adler >> 16) & 0xffff;
        for($i = 0 ; $i < strlen($str) ; $i++)
        {
            $s1 = ($s1 + Ord($str[$i])) % $BASE ;
            $s2 = ($s2 + $s1) % $BASE ;
            //echo "s1 : $s1 <BR> s2 : $s2 <BR>";

        }
        return leftshift($s2 , 16) + $s1;
    }

    function leftshift($str , $num)
    {

        $str = DecBin($str);

        for( $i = 0 ; $i < (64 - strlen($str)) ; $i++)
            $str = "0".$str ;

        for($i = 0 ; $i < $num ; $i++)
        {
            $str = $str."0";
            $str = substr($str , 1 ) ;
            //echo "str : $str <BR>";
        }
        return cdec($str) ;
    }

    function cdec($num)
    {

        for ($n = 0 ; $n < strlen($num) ; $n++)
        {
            $temp = $num[$n] ;
            $dec =  $dec + $temp*pow(2 , strlen($num) - $n - 1);
        }

        return $dec;
    }
?>

文件#2:form.php

处理页面代码 完成购物所需的参数 本页面中的数据来自购物车的结账表单,根据CCAcenue规则进行收集和验证,并以给定的格式进行排列,然后将其发送给CCAenue SERVER进行支付处理

<?php
    include(ccavenueValidate.php);
    $ccavenuemerchantId= "";//This id(also User Id)  available at "Generate Working Key" of "Settings & Options"
    $Amount = $orderdata[5];//your script should substitute the amount in the quotes provided here
    $orderId= $orderdata[0];;//your script should substitute the order description in the quotes provided here
    $WorkingKey = "";//Given to merchant by ccavenue
    $returnUrl ="http://www.example.com/shopping.php"; //url of your successpage
    $Checksum = getCheckSum($Merchant_Id,$Amount,$orderId,$Redirect_Url,$WorkingKey); // Validate All value
?>

<p align="center" style="font-family:Calibri; font-size:24px;color:#3670A7;">Processing to CCAvenue..............</p>

<form id="submittoserver" method="post" action="https://www.ccavenue.com/shopzone/cc_details.jsp">
    <input type="hidden" name="Merchant_Id" value="<?php echo $ccavenuemerchantId; ?>">
    <input type="hidden" name="Amount" value="<?php echo $Amount; ?>">
    <input type="hidden" name="Order_Id" value="<?php echo $ orderId; ?>">
    <input type="hidden" name="Redirect_Url" value="<?php echo $ returnUrl; ?>">
    <input type="hidden" name="Checksum" value="<?php echo $Checksum; ?>">
    <input type="hidden" name="billing_cust_name" value="<?php echo $orderdata[7].$orderdata[8];?>"> <!--Pass Customer Full Name -->
    <input type="hidden" name="billing_cust_address" value="<?php echo $orderdata[9].$orderdata[10];?>"><!--Pass Customer Full Address-->
    <input type="hidden" name="billing_cust_country" value="<?php echo $orderdata[15];?>"> <!--Pass Customer Country -->
    <input type="hidden" name="billing_cust_state" value="<?php echo $orderdata[14];?>"><!--Pass Customer State -->
    <input type="hidden" name="billing_cust_city" value="<?php echo $orderdata[13];?>"> <!--Pass Customer City -->
    <input type="hidden" name="billing_zip" value="<?php echo $orderdata[16];?>"> <!--Pass Customer Zip Code-->
    <input type="hidden" name="billing_cust_tel" value="<?php echo $orderdata[11];?>"> <!--Pass Customer Phone No-->
    <input type="hidden" name="billing_cust_email" value="<?php echo $orderdata[12];?>"> <!--Pass Customer Email address-->
    <input type="hidden" name="delivery_cust_name" value="<?php echo $orderdata[7].$orderdata[8];?>"> <!--Pass Same or other other detail fill by customer-->
    <input type="hidden" name="delivery_cust_address" value="<?php echo $orderdata[9].$orderdata[10];?>">
    <input type="hidden" name="delivery_cust_country" value="<?php echo $orderdata[15];?>">
    <input type="hidden" name="delivery_cust_state" value="<?php echo $orderdata[14];?>">
    <input type="hidden" name="delivery_cust_tel" value="<?php echo $orderdata[11];?>">
    <input type="hidden" name="delivery_cust_notes" value="">
    <input type="hidden" name="Merchant_Param" value="">
    <input type="hidden" name="billing_zip_code" value="<?php echo $orderdata[16];?>">
    <input type="hidden" name="delivery_cust_city" value="<?php echo $orderdata[13];?>">
    <input type="hidden" name="delivery_zip_code" value="<?php echo $orderdata[16];?>">

</form>

处理到CCAVINE的过程


plzzz伙计们帮我这对我来说太紧急了。我从我的CCAVINE帐户中填写了我的商户id和工作密钥。thnks john peter…但我只想知道$orderdata是从哪里来的???欢迎伙计,你需要传递购物车数据中的值,$orderdata是我在编码中给出的示例。,因此,您需要替换为购物车数据变量。您是否参考了我在上面发布的先前评论。thnks非常需要您的帮助,但我正在为在线费用提交而不是购物车实施此网关,因为我正在学校网站上工作。因此,我想知道费用提交的简单流程Manindra Singh 2分钟前您需要从您的注册表中获取金额和用户账单详细信息的post数据,如。,