无效的交易。请重试udf1

时间:2019-03-04 13:12:13

标签: php payumoney

当我在成功页面中调用udf1时,我收到了无效的交易,我以payumoney形式添加了用户定义的字段,并将其称为我的成功页面,我收到了无效的交易错误,请有人告诉我如何使用udf1和udf2等...

以下是我的success.php代码:

<?php

$status=$_POST["status"];
$firstname=$_POST["firstname"];
$amount=$_POST["amount"];
$txnid=$_POST["txnid"];
$posted_hash=$_POST["hash"];
$key=$_POST["key"];
$email=$_POST["email"];
$phone=$_POST["phone"];
$college=$_POST["college"];
$branch=$_POST["branch"];
$course=$_POST["course"];
$city=$_POST["city"];
$udf1=$_POST["$udf1"];
$productinfo=$_POST["productinfo"];
$salt="wxxxxxcxxxxxxxxx";       

// Salt should be same Post Request 

If (isset($_POST["additionalCharges"])) {
       $additionalCharges=$_POST["additionalCharges"];
        $retHashSeq = $additionalCharges.'|'.$salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;
  } else {
        $retHashSeq = $salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;
         }
         $hash = hash("sha512", $retHashSeq);
       if ($hash != $posted_hash) {
           echo "Invalid Transaction. Please try again";
           } else {


          echo "<h3>Thank You. Your order status is ". $status .".</h3>";
          echo "<h4>Your Transaction ID for this transaction is ".$txnid.".</h4>";
          echo "<h4>We have received a payment of Rs. " . $amount . ". Your order will soon be shipped.</h4>";
           }
?>  

0 个答案:

没有答案