to_pay.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. if(!defined('InEmpireCMS'))
  3. {
  4. exit();
  5. }
  6. eCheckCloseMods('pay');//关闭模块
  7. //------------------ 参数开始 ------------------
  8. //商户号
  9. $v_mid=$payr['payuser'];
  10. //密钥
  11. $key=$payr['paykey'];
  12. //返回地址
  13. $v_url=$PayReturnUrlQz."e/payapi/chinabank/payend.php";
  14. //币种
  15. $v_moneytype="CNY";
  16. //------------------ 参数结束 ------------------
  17. $v_amount=$money;
  18. //产生定单号
  19. $v_oid=date("Ymd")."-".$v_mid."-".date("His");
  20. $ddno=$ddno?$ddno:time(); //订单号
  21. esetcookie("checkpaysession",$ddno,0); //设置定单号
  22. //md5
  23. $text=$v_amount.$v_moneytype.$v_oid.$v_mid.$v_url.$key;
  24. $v_md5info=strtoupper(md5($text));
  25. $remark1=$ddno;//备注字段1
  26. $remark2=$productname;//备注字段2
  27. ?>
  28. <html>
  29. <title>在线支付</title>
  30. <meta http-equiv="Cache-Control" content="no-cache"/>
  31. <body>
  32. <form method="post" name="dopaypost" id="dopaypost" action="https://pay3.chinabank.com.cn/PayGate">
  33. <input type="hidden" name="v_mid" value="<?php echo $v_mid;?>">
  34. <input type="hidden" name="v_oid" value="<?php echo $v_oid;?>">
  35. <input type="hidden" name="v_amount" value="<?php echo $v_amount;?>">
  36. <input type="hidden" name="v_moneytype" value="<?php echo $v_moneytype;?>">
  37. <input type="hidden" name="v_url" value="<?php echo $v_url ;?>">
  38. <input type="hidden" name="v_md5info" value="<?php echo $v_md5info;?>">
  39. <input type="hidden" name="remark1" value="<?php echo $remark1;?>">
  40. <input type="hidden" name="remark2" value="<?php echo $remark2;?>">
  41. <input type="submit" style="font-size: 9pt" value="在线支付" name="v_action">
  42. </form>
  43. <script>
  44. document.getElementById('dopaypost').submit();
  45. </script>
  46. </body>
  47. </html>