index.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <?php
  2. /* *
  3. * 功能:支付宝手机网站支付接口接口调试入口页面
  4. * 版本:3.4
  5. * 修改日期:2016-03-08
  6. * 说明:
  7. * 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
  8. */
  9. ?>
  10. <!DOCTYPE html>
  11. <html>
  12. <head>
  13. <title>支付宝手机网站支付接口接口</title>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <style>
  16. *{
  17. margin:0;
  18. padding:0;
  19. }
  20. ul,ol{
  21. list-style:none;
  22. }
  23. body{
  24. font-family: "Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
  25. }
  26. .hidden{
  27. display:none;
  28. }
  29. .new-btn-login-sp{
  30. padding: 1px;
  31. display: inline-block;
  32. width: 75%;
  33. }
  34. .new-btn-login {
  35. background-color: #02aaf1;
  36. color: #FFFFFF;
  37. font-weight: bold;
  38. border: none;
  39. width: 100%;
  40. height: 30px;
  41. border-radius: 5px;
  42. font-size: 16px;
  43. }
  44. #main{
  45. width:100%;
  46. margin:0 auto;
  47. font-size:14px;
  48. }
  49. .red-star{
  50. color:#f00;
  51. width:10px;
  52. display:inline-block;
  53. }
  54. .null-star{
  55. color:#fff;
  56. }
  57. .content{
  58. margin-top:5px;
  59. }
  60. .content dt{
  61. width:100px;
  62. display:inline-block;
  63. float: left;
  64. margin-left: 20px;
  65. color: #666;
  66. font-size: 13px;
  67. margin-top: 8px;
  68. }
  69. .content dd{
  70. margin-left:120px;
  71. margin-bottom:5px;
  72. }
  73. .content dd input {
  74. width: 85%;
  75. height: 28px;
  76. border: 0;
  77. -webkit-border-radius: 0;
  78. -webkit-appearance: none;
  79. }
  80. #foot{
  81. margin-top:10px;
  82. position: absolute;
  83. bottom: 15px;
  84. width: 100%;
  85. }
  86. .foot-ul{
  87. width: 100%;
  88. }
  89. .foot-ul li {
  90. width: 100%;
  91. text-align:center;
  92. color: #666;
  93. }
  94. .note-help {
  95. color: #999999;
  96. font-size: 12px;
  97. line-height: 130%;
  98. margin-top: 5px;
  99. width: 100%;
  100. display: block;
  101. }
  102. #btn-dd{
  103. margin: 20px;
  104. text-align: center;
  105. }
  106. .foot-ul{
  107. width: 100%;
  108. }
  109. .one_line{
  110. display: block;
  111. height: 1px;
  112. border: 0;
  113. border-top: 1px solid #eeeeee;
  114. width: 100%;
  115. margin-left: 20px;
  116. }
  117. .am-header {
  118. display: -webkit-box;
  119. display: -ms-flexbox;
  120. display: box;
  121. width: 100%;
  122. position: relative;
  123. padding: 7px 0;
  124. -webkit-box-sizing: border-box;
  125. -ms-box-sizing: border-box;
  126. box-sizing: border-box;
  127. background: #1D222D;
  128. height: 50px;
  129. text-align: center;
  130. -webkit-box-pack: center;
  131. -ms-flex-pack: center;
  132. box-pack: center;
  133. -webkit-box-align: center;
  134. -ms-flex-align: center;
  135. box-align: center;
  136. }
  137. .am-header h1 {
  138. -webkit-box-flex: 1;
  139. -ms-flex: 1;
  140. box-flex: 1;
  141. line-height: 18px;
  142. text-align: center;
  143. font-size: 18px;
  144. font-weight: 300;
  145. color: #fff;
  146. }
  147. </style>
  148. </head>
  149. <body text=#000000 bgColor="#ffffff" leftMargin=0 topMargin=4>
  150. <header class="am-header">
  151. <h1>支付宝手机网站支付接口快速通道</h1>
  152. </header>
  153. <div id="main">
  154. <form name=alipayment action=alipayapi.php method=post target="_blank">
  155. <div id="body" style="clear:left">
  156. <dl class="content">
  157. <dt>商户订单号 :</dt>
  158. <dd>
  159. <input id="WIDout_trade_no" name="WIDout_trade_no" />
  160. </dd>
  161. <hr class="one_line">
  162. <dt>订单名称 :</dt>
  163. <dd>
  164. <input id="WIDsubject" name="WIDsubject" />
  165. </dd>
  166. <hr class="one_line">
  167. <dt>付款金额 :</dt>
  168. <dd>
  169. <input id="WIDtotal_fee" name="WIDtotal_fee" />
  170. </dd>
  171. <hr class="one_line">
  172. <dt>商品展示网址 :</dt>
  173. <dd>
  174. <input id="WIDshow_url" name="WIDshow_url" />
  175. </dd>
  176. <hr class="one_line">
  177. <dt>商品描述:</dt>
  178. <dd>
  179. <input id="WIDbody" name="WIDbody" />
  180. </dd>
  181. <hr class="one_line">
  182. <dt></dt>
  183. <dd id="btn-dd">
  184. <span class="new-btn-login-sp">
  185. <button class="new-btn-login" type="submit" style="text-align:center;">确 认</button>
  186. </span>
  187. <span class="note-help">如果您点击“确认”按钮,即表示您同意该次的执行操作。</span>
  188. </dd>
  189. </dl>
  190. </div>
  191. </form>
  192. <div id="foot">
  193. <ul class="foot-ul">
  194. <li>
  195. 支付宝版权所有 2015-2018 ALIPAY.COM
  196. </li>
  197. </ul>
  198. </div>
  199. </div>
  200. </body>
  201. <script language="javascript">
  202. function GetDateNow() {
  203. var vNow = new Date();
  204. var sNow = "";
  205. sNow += String(vNow.getFullYear());
  206. sNow += String(vNow.getMonth() + 1);
  207. sNow += String(vNow.getDate());
  208. sNow += String(vNow.getHours());
  209. sNow += String(vNow.getMinutes());
  210. sNow += String(vNow.getSeconds());
  211. sNow += String(vNow.getMilliseconds());
  212. document.getElementById("WIDout_trade_no").value = sNow;
  213. document.getElementById("WIDsubject").value = "测试";
  214. document.getElementById("WIDtotal_fee").value = "0.01";
  215. }
  216. GetDateNow();
  217. </script>
  218. </html>