| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 | 
							- <?php
 
- $type = Dever::config('base', 'pay')->pay['type'];
 
- $box = array
 
- (
 
- 	1 => '正式环境',
 
- 	2 => '沙箱模式',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'account',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '账户管理',
 
- 	'order' => 10,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 	
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			'list'		=> true,
 
- 		),
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-60',
 
- 			'name' 		=> '账户名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '账户名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-30',
 
- 			'name' 		=> '支付类型',
 
- 			'default' 	=> 'wechat',
 
- 			'desc' 		=> '支付类型',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			'control'	=> 'type',
 
- 		),
 
- 		'box'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '支付环境',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '支付环境',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $box,
 
- 			'show'		=> 'alipay',
 
- 		),
 
- 		'mchid'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '商户号',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '商户号',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'key'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '密匙key',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '密匙key',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'appid'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> 'appid',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> 'appid',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'	=> 'type=wechat,cmbc,alipay',
 
- 		),
 
- 		'appsecret'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-300',
 
- 			'name' 		=> 'appsecret',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> 'appsecret',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'	=> 'type=wechat,cmbc',
 
- 		),
 
- 		'account'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '支付账号',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '支付账号',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'	=> 'type=alipay',
 
- 		),
 
- 		'private_key'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '商户私钥-https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.nBDxfy&treeId=58&articleId=103242&docType=1',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '商户私钥',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'textarea',
 
- 			'show'	=> 'type=alipay',
 
- 		),
 
- 		'm_public_key'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-1000',
 
- 			'name' 		=> '商户公钥-https://b.alipay.com/order/pidAndKey.htm',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '商户公钥',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'textarea',
 
- 			'show'	=> 'type=alipay',
 
- 		),
 
- 		'public_key'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-1000',
 
- 			'name' 		=> '支付宝公钥-https://b.alipay.com/order/pidAndKey.htm',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '支付宝公钥',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'textarea',
 
- 			'show'	=> 'type=alipay',
 
- 		),
 
- 		'appCertPath'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '支付宝appCertPath',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '证书cert文件',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'upload',
 
- 			'key'		=> '4',
 
- 			'show'	=> 'type=alipay',
 
- 		),
 
- 		'alipayCertPath'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '支付宝alipayCertPath',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '证书key文件',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'upload',
 
- 			'key'		=> '4',
 
- 			'show'	=> 'type=alipay',
 
- 		),
 
- 		'rootCertPath'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '支付宝rootCertPath',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '证书key文件',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'upload',
 
- 			'key'		=> '4',
 
- 			'show'	=> 'type=alipay',
 
- 		),
 
- 		'file_cert'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '证书cert文件-微信支付需要退款时使用',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '证书cert文件',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'upload',
 
- 			'key'		=> '4',
 
- 			'show'	=> 'type=wechat',
 
- 		),
 
- 		'file_key'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '证书key文件-微信支付需要退款时使用',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '证书key文件',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'upload',
 
- 			'key'		=> '4',
 
- 			'show'	=> 'type=wechat',
 
- 		),
 
- 		'timeout'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '支付有效期-秒',
 
- 			'default' 	=> '600',
 
- 			'desc' 		=> '支付有效期',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'state'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择状态',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		
 
- 		'cdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '申请时间',
 
- 			'match' 	=> array('is_numeric', time()),
 
- 			'desc' 		=> '',
 
- 			# 只有insert时才生效
 
- 			'insert'	=> true,
 
- 			'search'	=> 'date',
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- );
 
 
  |