to_pay.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. if (!defined('IN_MYMPS')) {
  3. exit();
  4. }
  5. $bargainor_id = $payr['payuser'];
  6. $key = $payr['paykey'];
  7. $return_url = $PayReturnUrlQz . '/include/payment/tenpay/payend.php';
  8. $fee_type = 1;
  9. $bank_type = '0';
  10. $total_fee = $money * 100;
  11. $strCmdNo = '1';
  12. $strBillDate = date('Ymd');
  13. $desc = $productname;
  14. $strBuyerId = '';
  15. $strSpBillNo = $ddno ? $ddno : $timestamp;
  16. msetcookie('checkpaysession', $strSpBillNo, 0);
  17. $strTransactionId = $bargainor_id . $strBillDate . $strSpBillNo;
  18. $attach = $strSpBillNo;
  19. $spbill_create_ip = $_SERVER['REMOTE_ADDR'];
  20. $strSignText = 'cmdno=' . $strCmdNo . '&date=' . $strBillDate . '&bargainor_id=' . $bargainor_id . '&transaction_id=' . $strTransactionId . '&sp_billno=' . $strSpBillNo . '&total_fee=' . $total_fee . '&fee_type=' . $fee_type . '&return_url=' . $return_url . '&attach=' . $attach . '&spbill_create_ip=' . $spbill_create_ip . '&key=' . $key;
  21. $strSign = strtoupper(md5($strSignText));
  22. ToPayMoney($money, $attach, $uid, $s_uid, 'tenpay');
  23. echo '<html>
  24. <title>财付通支付</title>
  25. <meta http-equiv="Cache-Control" content="no-cache"/>
  26. <body>
  27. <form action="https://www.tenpay.com/cgi-bin/v1.0/pay_gate.cgi" name="dopaypost" id="dopaypost">
  28. <input type=hidden name="cmdno" value="';
  29. echo $strCmdNo;
  30. echo '">
  31. <input type=hidden name="date" value="';
  32. echo $strBillDate;
  33. echo '">
  34. <input type=hidden name="bank_type" value="';
  35. echo $bank_type;
  36. echo '">
  37. <input type=hidden name="desc" value="';
  38. echo $desc;
  39. echo '">
  40. <input type=hidden name="purchaser_id" value="';
  41. echo $strBuyerId;
  42. echo '">
  43. <input type=hidden name="bargainor_id" value="';
  44. echo $bargainor_id;
  45. echo '">
  46. <input type=hidden name="transaction_id" value="';
  47. echo $strTransactionId;
  48. echo '">
  49. <input type=hidden name="sp_billno" value="';
  50. echo $strSpBillNo;
  51. echo '">
  52. <input type=hidden name="total_fee" value="';
  53. echo $total_fee;
  54. echo '">
  55. <input type=hidden name="fee_type" value="';
  56. echo $fee_type;
  57. echo '">
  58. <input type=hidden name="return_url" value="';
  59. echo $return_url;
  60. echo '">
  61. <input type=hidden name="attach" value="';
  62. echo $attach;
  63. echo '">
  64. <input type=hidden name="sign" value="';
  65. echo $strSign;
  66. echo '">
  67. <input type=hidden name="spbill_create_ip" value="';
  68. echo $spbill_create_ip;
  69. echo '">
  70. <input type="submit" name="submit2" value="财付通支付">
  71. </form>
  72. <script>
  73. document.getElementById(\'dopaypost\').submit();
  74. </script>
  75. </body>
  76. </html>';
  77. ?>