新版订单消耗系统

index.php 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. <?php
  2. /* *
  3. * 功能:支付宝电脑支付调试入口页面
  4. * 修改日期:2017-03-30
  5. * 说明:
  6. * 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
  7. */
  8. ?>
  9. <!DOCTYPE html>
  10. <html>
  11. <head>
  12. <title>支付宝电脑网站支付</title>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <style>
  15. *{
  16. margin:0;
  17. padding:0;
  18. }
  19. ul,ol{
  20. list-style:none;
  21. }
  22. body{
  23. font-family: "Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
  24. }
  25. .tab-head{
  26. margin-left:120px;
  27. margin-bottom:10px;
  28. }
  29. .tab-content{
  30. clear:left;
  31. display: none;
  32. }
  33. h2{
  34. border-bottom: solid #02aaf1 2px;
  35. width: 200px;
  36. height: 25px;
  37. margin: 0;
  38. float: left;
  39. text-align: center;
  40. font-size: 16px;
  41. }
  42. .selected{
  43. color: #FFFFFF;
  44. background-color: #02aaf1;
  45. }
  46. .show{
  47. clear:left;
  48. display: block;
  49. }
  50. .hidden{
  51. display:none;
  52. }
  53. .new-btn-login-sp{
  54. padding: 1px;
  55. display: inline-block;
  56. width: 75%;
  57. }
  58. .new-btn-login {
  59. background-color: #02aaf1;
  60. color: #FFFFFF;
  61. font-weight: bold;
  62. border: none;
  63. width: 100%;
  64. height: 30px;
  65. border-radius: 5px;
  66. font-size: 16px;
  67. }
  68. #main{
  69. width:100%;
  70. margin:0 auto;
  71. font-size:14px;
  72. }
  73. .red-star{
  74. color:#f00;
  75. width:10px;
  76. display:inline-block;
  77. }
  78. .null-star{
  79. color:#fff;
  80. }
  81. .content{
  82. margin-top:5px;
  83. }
  84. .content dt{
  85. width:100px;
  86. display:inline-block;
  87. float: left;
  88. margin-left: 20px;
  89. color: #666;
  90. font-size: 13px;
  91. margin-top: 8px;
  92. }
  93. .content dd{
  94. margin-left:120px;
  95. margin-bottom:5px;
  96. }
  97. .content dd input {
  98. width: 85%;
  99. height: 28px;
  100. border: 0;
  101. -webkit-border-radius: 0;
  102. -webkit-appearance: none;
  103. }
  104. #foot{
  105. margin-top:10px;
  106. position: absolute;
  107. bottom: 15px;
  108. width: 100%;
  109. }
  110. .foot-ul{
  111. width: 100%;
  112. }
  113. .foot-ul li {
  114. width: 100%;
  115. text-align:center;
  116. color: #666;
  117. }
  118. .note-help {
  119. color: #999999;
  120. font-size: 12px;
  121. line-height: 130%;
  122. margin-top: 5px;
  123. width: 100%;
  124. display: block;
  125. }
  126. #btn-dd{
  127. margin: 20px;
  128. text-align: center;
  129. }
  130. .foot-ul{
  131. width: 100%;
  132. }
  133. .one_line{
  134. display: block;
  135. height: 1px;
  136. border: 0;
  137. border-top: 1px solid #eeeeee;
  138. width: 100%;
  139. margin-left: 20px;
  140. }
  141. .am-header {
  142. display: -webkit-box;
  143. display: -ms-flexbox;
  144. display: box;
  145. width: 100%;
  146. position: relative;
  147. padding: 7px 0;
  148. -webkit-box-sizing: border-box;
  149. -ms-box-sizing: border-box;
  150. box-sizing: border-box;
  151. background: #1D222D;
  152. height: 50px;
  153. text-align: center;
  154. -webkit-box-pack: center;
  155. -ms-flex-pack: center;
  156. box-pack: center;
  157. -webkit-box-align: center;
  158. -ms-flex-align: center;
  159. box-align: center;
  160. }
  161. .am-header h1 {
  162. -webkit-box-flex: 1;
  163. -ms-flex: 1;
  164. box-flex: 1;
  165. line-height: 18px;
  166. text-align: center;
  167. font-size: 18px;
  168. font-weight: 300;
  169. color: #fff;
  170. }
  171. </style>
  172. </head>
  173. <body text=#000000 bgColor="#ffffff" leftMargin=0 topMargin=4>
  174. <header class="am-header">
  175. <h1>支付宝电脑网站支付体验入口页</h1>
  176. </header>
  177. <div id="main">
  178. <div id="tabhead" class="tab-head">
  179. <h2 id="tab1" class="selected" name="tab">付 款</h2>
  180. <h2 id="tab2" name="tab">交 易 查 询</h2>
  181. <h2 id="tab3" name="tab">退 款</h2>
  182. <h2 id="tab4" name="tab">退 款 查 询</h2>
  183. <h2 id="tab5" name="tab">交 易 关 闭</h2>
  184. </div>
  185. <form name=alipayment action=pagepay/pagepay.php method=post target="_blank">
  186. <div id="body1" class="show" name="divcontent">
  187. <dl class="content">
  188. <dt>商户订单号
  189. :</dt>
  190. <dd>
  191. <input id="WIDout_trade_no" name="WIDout_trade_no" />
  192. </dd>
  193. <hr class="one_line">
  194. <dt>订单名称
  195. :</dt>
  196. <dd>
  197. <input id="WIDsubject" name="WIDsubject" />
  198. </dd>
  199. <hr class="one_line">
  200. <dt>付款金额
  201. :</dt>
  202. <dd>
  203. <input id="WIDtotal_amount" name="WIDtotal_amount" />
  204. </dd>
  205. <hr class="one_line">
  206. <dt>商品描述:</dt>
  207. <dd>
  208. <input id="WIDbody" name="WIDbody" />
  209. </dd>
  210. <hr class="one_line">
  211. <dt></dt>
  212. <dd id="btn-dd">
  213. <span class="new-btn-login-sp">
  214. <button class="new-btn-login" type="submit" style="text-align:center;">付 款</button>
  215. </span>
  216. <span class="note-help">如果您点击“付款”按钮,即表示您同意该次的执行操作。</span>
  217. </dd>
  218. </dl>
  219. </div>
  220. </form>
  221. <form name=tradequery action=pagepay/query.php method=post target="_blank">
  222. <div id="body2" class="tab-content" name="divcontent">
  223. <dl class="content">
  224. <dt>商户订单号
  225. :</dt>
  226. <dd>
  227. <input id="WIDTQout_trade_no" name="WIDTQout_trade_no" />
  228. </dd>
  229. <hr class="one_line">
  230. <dt>支付宝交易号
  231. :</dt>
  232. <dd>
  233. <input id="WIDTQtrade_no" name="WIDTQtrade_no" />
  234. </dd>
  235. <hr class="one_line">
  236. <dt></dt>
  237. <dd>
  238. <span style="line-height: 28px; color:red;">注意:商户订单号和支付宝交易号不能同时为空。 trade_no、 out_trade_no如果同时存在优先取trade_no</span>
  239. </dd>
  240. <dd id="btn-dd">
  241. <span class="new-btn-login-sp">
  242. <button class="new-btn-login" type="submit" style="text-align:center;">交 易 查 询</button>
  243. </span>
  244. <span class="note-help">商户订单号与支付宝交易号二选一,如果您点击“交易查询”按钮,即表示您同意该次的执行操作。</span>
  245. </dd>
  246. </dl>
  247. </div>
  248. </form>
  249. <form name=traderefund action=pagepay/refund.php method=post target="_blank">
  250. <div id="body3" class="tab-content" name="divcontent">
  251. <dl class="content">
  252. <dt>商户订单号
  253. :</dt>
  254. <dd>
  255. <input id="WIDTRout_trade_no" name="WIDTRout_trade_no" />
  256. </dd>
  257. <hr class="one_line">
  258. <dt>支付宝交易号
  259. :</dt>
  260. <dd>
  261. <input id="WIDTRtrade_no" name="WIDTRtrade_no" />
  262. </dd>
  263. <hr class="one_line">
  264. <dt>退款金额
  265. :</dt>
  266. <dd>
  267. <input id="WIDTRrefund_amount" name="WIDTRrefund_amount" />
  268. </dd>
  269. <hr class="one_line">
  270. <dt>退款原因
  271. :</dt>
  272. <dd>
  273. <input id="WIDTRrefund_reason" name="WIDTRrefund_reason" />
  274. </dd>
  275. <hr class="one_line">
  276. <dt>退款请求号
  277. :</dt>
  278. <dd>
  279. <input id="WIDTRout_request_no" name="WIDTRout_request_no" />
  280. </dd>
  281. <hr class="one_line">
  282. <dt></dt>
  283. <dd>
  284. <span style="line-height: 28px; color:red;">注意:如是部分退款,则参数退款单号(out_request_no)必传。</span>
  285. </dd>
  286. <dd id="btn-dd">
  287. <span class="new-btn-login-sp">
  288. <button class="new-btn-login" type="submit" style="text-align:center;">退 款</button>
  289. </span>
  290. <span class="note-help">商户订单号与支付宝交易号二选一,如果您点击“退款”按钮,即表示您同意该次的执行操作。</span>
  291. </dd>
  292. </dl>
  293. </div>
  294. </form>
  295. <form name=traderefundquery action=pagepay/refundquery.php method=post target="_blank">
  296. <div id="body4" class="tab-content" name="divcontent">
  297. <dl class="content">
  298. <dt>商户订单号
  299. :</dt>
  300. <dd>
  301. <input id="WIDRQout_trade_no" name="WIDRQout_trade_no" />
  302. </dd>
  303. <hr class="one_line">
  304. <dt>支付宝交易号
  305. :</dt>
  306. <dd>
  307. <input id="WIDRQtrade_no" name="WIDRQtrade_no" />
  308. </dd>
  309. <hr class="one_line">
  310. <dt>退款请求号
  311. :</dt>
  312. <dd>
  313. <input id="WIDRQout_request_no" name="WIDRQout_request_no" />
  314. </dd>
  315. <hr class="one_line">
  316. <dt></dt>
  317. <dd>
  318. <span style="line-height: 28px; color:red;">注意:退款请求号值(必传,退款时传的值,如果退款时没传则无法查询)商户订单号和支付宝交易号不能同时为空。 trade_no、 out_trade_no如果同时存在优先取trade_no</span>
  319. </dd>
  320. <dd id="btn-dd">
  321. <span class="new-btn-login-sp">
  322. <button class="new-btn-login" type="submit" style="text-align:center;">退 款 查 询</button>
  323. </span>
  324. <span class="note-help">商户订单号与支付宝交易号二选一,如果您点击“退款查询”按钮,即表示您同意该次的执行操作。</span>
  325. </dd>
  326. </dl>
  327. </div>
  328. </form>
  329. <form name=tradeclose action=pagepay/close.php method=post target="_blank">
  330. <div id="body5" class="tab-content" name="divcontent">
  331. <dl class="content">
  332. <dt>商户订单号
  333. :</dt>
  334. <dd>
  335. <input id="WIDTCout_trade_no" name="WIDTCout_trade_no" />
  336. </dd>
  337. <hr class="one_line">
  338. <dt>支付宝交易号
  339. :</dt>
  340. <dd>
  341. <input id="WIDTCtrade_no" name="WIDTCtrade_no" />
  342. </dd>
  343. <hr class="one_line">
  344. <dt></dt>
  345. <dd>
  346. <span style="line-height: 28px; color:red;">注意:商户订单号和支付宝交易号不能同时为空。 trade_no、 out_trade_no如果同时存在优先取trade_no</span>
  347. </dd>
  348. <dd id="btn-dd">
  349. <span class="new-btn-login-sp">
  350. <button class="new-btn-login" type="submit" style="text-align:center;">交 易 关 闭</button>
  351. </span>
  352. <span class="note-help">商户订单号与支付宝交易号二选一,如果您点击“交易关闭”按钮,即表示您同意该次的执行操作。</span>
  353. </dd>
  354. </dl>
  355. </div>
  356. </form>
  357. <div id="foot">
  358. <ul class="foot-ul">
  359. <li>
  360. 支付宝版权所有 2015-2018 ALIPAY.COM
  361. </li>
  362. </ul>
  363. </div>
  364. </div>
  365. </body>
  366. <script language="javascript">
  367. var tabs = document.getElementsByName('tab');
  368. var contents = document.getElementsByName('divcontent');
  369. (function changeTab(tab) {
  370. for(var i = 0, len = tabs.length; i < len; i++) {
  371. tabs[i].onmouseover = showTab;
  372. }
  373. })();
  374. function showTab() {
  375. for(var i = 0, len = tabs.length; i < len; i++) {
  376. if(tabs[i] === this) {
  377. tabs[i].className = 'selected';
  378. contents[i].className = 'show';
  379. } else {
  380. tabs[i].className = '';
  381. contents[i].className = 'tab-content';
  382. }
  383. }
  384. }
  385. function GetDateNow() {
  386. var vNow = new Date();
  387. var sNow = "";
  388. sNow += String(vNow.getFullYear());
  389. sNow += String(vNow.getMonth() + 1);
  390. sNow += String(vNow.getDate());
  391. sNow += String(vNow.getHours());
  392. sNow += String(vNow.getMinutes());
  393. sNow += String(vNow.getSeconds());
  394. sNow += String(vNow.getMilliseconds());
  395. document.getElementById("WIDout_trade_no").value = sNow;
  396. document.getElementById("WIDsubject").value = "测试";
  397. document.getElementById("WIDtotal_amount").value = "0.01";
  398. }
  399. GetDateNow();
  400. </script>
  401. </html>