【问题标题】:How to set money manually in payu money如何在payu money中手动设置钱
【发布时间】:2018-10-24 11:13:45
【问题描述】:

我想在金额字段中设置固定金额。我尝试了这个,但在进入 payumoney 付款页面后出现错误。错误是数量无效和校验和错误

第 1 页

   <?php $myVariable1 = "2";?>

  <form action="http://nailspaexperience.com/old-manish/App_Data/" method="post">
                    <p>£42.00</p>
                    <input type="hidden" name="textarea1" value="<?php echo $myVariable1; ?>">
                    <button type="submit">Submit</button>
                </form>



  Page 2 

 session_start(); // needs to be before anything else on page to use 
$_SESSION
  // this page outputs the textarea1 from the session IF it exists
  $textarea1 = "2"; // set var to avoid errors
  if(isset($_SESSION['textarea1'])){
    $textarea1 = $_SESSION['textarea1'];
  }



  <div  class="form-input">
  <label>Amount: </label>
   <input name="textarea1" placeholder="Enter amount" value="<?php echo $textarea1; ?>" />
</div>

【问题讨论】:

    标签: php payment-gateway payumoney


    【解决方案1】:
        For payu money, they have defined parameters with defined input names.
        Replace your name="textarea" to name="amount" and try.
    
        Let me know still your facing the issue.
    
        Updated Answer
    
         $posted['key'] = $MERCHANT_KEY;
            $posted['txnid'] = $txnid;
            $posted['amount'] = 100;
            $posted['firstname'] = 'Bhushan';
            $posted['lastname'] = Lunkad;
            $posted['email'] = 'Your email';
            $posted['phone'] = 'mobile';
            $posted['productinfo'] = 'Product info";
    ``      $posted['surl'] = 'success url';
            $posted['furl'] = 'failure url';
    $hashSequence = "key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10";
    
        $hashVarsSeq = explode('|', $hashSequence);
        $hash_string = '';
        foreach ($hashVarsSeq as $hash_var)
        {
            $hash_string .= isset($posted[$hash_var]) ? $posted[$hash_var] : '';
            $hash_string .= '|';
        }
        $hash_string .= $SALT;
        $hash = strtolower(hash('sha512', $hash_string));
    
    Hope it helps you.
    

    【讨论】:

    • @Mohsin 你添加了所有必需的参数吗?
    • @Bhusan 你可以在这里看到我的所有参数github.com/mohsinbhaai/Payment_Gateway/blob/master/index.php
    • 请将您的哈希序列更改为以下: $hashSequence = "key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9| udf10";
    • 另一行呢?对于前金额字段......我应该在那里给什么名字?我改变哈希序列
    猜你喜欢
    • 1970-01-01
    • 2016-02-23
    • 1970-01-01
    • 1970-01-01
    • 2017-02-14
    • 2019-11-22
    • 2021-10-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多