<?php
/**
 * [UQcms System] Copyright uqcms.com
 * QQ: 2200631718
 * Author: gj.name
 * This is NOT a freeware
*/
defined('IN_UQ') or exit('Access Denied'); class payment_mod extends module { public function get_all(){ $status = cfg('browser'); return $this->db->get_all("select * from ".table('api_payment')." where status = 1 and support = '".$status."' order by px desc"); } function pay($alias, $payInfo){ $browser = cfg('browser'); if($alias == 'balance'){ $this->balance($payInfo); }elseif($alias == 'cash'){ }else{ $result = $this->get_all_info(); $config_param = unserialize($result[$alias][$browser]['config']); $config_param['support'] = $result[$alias][$browser]['support']; $pay_alias = 'pay_'.$alias; $pay = new $pay_alias($config_param); return $pay->pay_url($payInfo); } } function get_all_info(){ $result = $this->db->get_all("select * from ".table('api_payment')); foreach($result as $k=>$v){ $data[$v['alias']][$v['support']] = $v; } return $data; } function balance($param){ } function balance_jump($type){ $llq = cfg('browser'); if($type == '1'){ if($llq == 'pc'){ $url = 'member.php?m=buy&status=2'; }else{ $url = 'wap.php?m=order&status=2'; } }else{ if($llq == 'pc'){ $url = 'member.php?m=account'; }else{ $url = 'wap.php?m=account'; } } return $url; } function payment_arr($pay_api){ $payApi = array( 'alipay'=>'1', 'wxpay'=>'2' ); if(isset($payApi[$pay_api])){ return $payApi[$pay_api]; }else{ return '0'; } } }