account.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?php
  2. $type = Dever::config('base', 'pay')->pay['type'];
  3. $box = array
  4. (
  5. 1 => '正式环境',
  6. 2 => '沙箱模式',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'account',
  12. # 显示给用户看的名称
  13. 'lang' => '账户管理',
  14. 'order' => 10,
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. 'list' => true,
  27. ),
  28. 'name' => array
  29. (
  30. 'type' => 'varchar-60',
  31. 'name' => '账户名称',
  32. 'default' => '',
  33. 'desc' => '账户名称',
  34. 'match' => 'is_string',
  35. 'update' => 'text',
  36. 'search' => 'fulltext',
  37. 'list' => true,
  38. ),
  39. 'type' => array
  40. (
  41. 'type' => 'varchar-30',
  42. 'name' => '支付类型',
  43. 'default' => 'wechat',
  44. 'desc' => '支付类型',
  45. 'match' => 'is_string',
  46. 'update' => 'radio',
  47. 'option' => $type,
  48. 'search' => 'select',
  49. 'list' => true,
  50. 'control' => 'type',
  51. ),
  52. 'box' => array
  53. (
  54. 'type' => 'int-11',
  55. 'name' => '支付环境',
  56. 'default' => '1',
  57. 'desc' => '支付环境',
  58. 'match' => 'is_numeric',
  59. 'update' => 'radio',
  60. 'option' => $box,
  61. 'show' => 'alipay',
  62. ),
  63. 'mchid' => array
  64. (
  65. 'type' => 'varchar-150',
  66. 'name' => '商户号',
  67. 'default' => '',
  68. 'desc' => '商户号',
  69. 'match' => 'is_string',
  70. 'update' => 'text',
  71. ),
  72. 'key' => array
  73. (
  74. 'type' => 'varchar-150',
  75. 'name' => '密匙key',
  76. 'default' => '',
  77. 'desc' => '密匙key',
  78. 'match' => 'is_string',
  79. 'update' => 'text',
  80. ),
  81. 'appid' => array
  82. (
  83. 'type' => 'varchar-150',
  84. 'name' => 'appid',
  85. 'default' => '',
  86. 'desc' => 'appid',
  87. 'match' => 'is_string',
  88. 'update' => 'text',
  89. 'show' => 'type=wechat,cmbc,alipay',
  90. ),
  91. 'appsecret' => array
  92. (
  93. 'type' => 'varchar-300',
  94. 'name' => 'appsecret',
  95. 'default' => '',
  96. 'desc' => 'appsecret',
  97. 'match' => 'is_string',
  98. 'update' => 'text',
  99. 'show' => 'type=wechat,cmbc',
  100. ),
  101. 'account' => array
  102. (
  103. 'type' => 'varchar-150',
  104. 'name' => '支付账号',
  105. 'default' => '',
  106. 'desc' => '支付账号',
  107. 'match' => 'is_string',
  108. 'update' => 'text',
  109. 'show' => 'type=alipay',
  110. ),
  111. 'private_key' => array
  112. (
  113. 'type' => 'text-255',
  114. 'name' => '商户私钥-https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.nBDxfy&treeId=58&articleId=103242&docType=1',
  115. 'default' => '',
  116. 'desc' => '商户私钥',
  117. 'match' => 'is_string',
  118. 'update' => 'textarea',
  119. 'show' => 'type=alipay',
  120. ),
  121. 'm_public_key' => array
  122. (
  123. 'type' => 'varchar-1000',
  124. 'name' => '商户公钥-https://b.alipay.com/order/pidAndKey.htm',
  125. 'default' => '',
  126. 'desc' => '商户公钥',
  127. 'match' => 'is_string',
  128. 'update' => 'textarea',
  129. 'show' => 'type=alipay',
  130. ),
  131. 'public_key' => array
  132. (
  133. 'type' => 'varchar-1000',
  134. 'name' => '支付宝公钥-https://b.alipay.com/order/pidAndKey.htm',
  135. 'default' => '',
  136. 'desc' => '支付宝公钥',
  137. 'match' => 'is_string',
  138. 'update' => 'textarea',
  139. 'show' => 'type=alipay',
  140. ),
  141. 'file_cert' => array
  142. (
  143. 'type' => 'varchar-150',
  144. 'name' => '证书cert文件',
  145. 'default' => '',
  146. 'desc' => '证书cert文件',
  147. 'match' => 'option',
  148. 'update' => 'upload',
  149. 'key' => '4',
  150. 'show' => 'type=wechat',
  151. ),
  152. 'file_key' => array
  153. (
  154. 'type' => 'varchar-150',
  155. 'name' => '证书key文件',
  156. 'default' => '',
  157. 'desc' => '证书key文件',
  158. 'match' => 'option',
  159. 'update' => 'upload',
  160. 'key' => '4',
  161. 'show' => 'type=wechat',
  162. ),
  163. 'timeout' => array
  164. (
  165. 'type' => 'int-11',
  166. 'name' => '支付有效期-秒',
  167. 'default' => '600',
  168. 'desc' => '支付有效期',
  169. 'match' => 'is_numeric',
  170. 'update' => 'text',
  171. ),
  172. 'state' => array
  173. (
  174. 'type' => 'tinyint-1',
  175. 'name' => '状态',
  176. 'default' => '1',
  177. 'desc' => '请选择状态',
  178. 'match' => 'is_numeric',
  179. ),
  180. 'cdate' => array
  181. (
  182. 'type' => 'int-11',
  183. 'name' => '申请时间',
  184. 'match' => array('is_numeric', time()),
  185. 'desc' => '',
  186. # 只有insert时才生效
  187. 'insert' => true,
  188. 'search' => 'date',
  189. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  190. ),
  191. ),
  192. );