mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改支付
This commit is contained in:
parent
db976f4f0a
commit
44e6e6b3eb
@ -75,7 +75,7 @@ class ShopPayment extends Controller
|
||||
protected function _form_filter(array &$data)
|
||||
{
|
||||
if (empty($data['code'])) {
|
||||
$data['code'] = CodeExtend::uniqidNumber(14, 'M');
|
||||
$data['code'] = CodeExtend::uniqidNumber(20, 'M');
|
||||
}
|
||||
if ($this->request->isGet()) {
|
||||
$this->payments = [];
|
||||
|
@ -289,7 +289,7 @@ class Order extends Auth
|
||||
$openid = '';
|
||||
if (in_array($this->type, [UserService::APITYPE_WXAPP, UserService::APITYPE_WECHAT])) {
|
||||
$openid = $this->user[UserService::TYPES[$this->type]['auth']] ?? '';
|
||||
if (empty($openid)) $this->error("无法创建支付");
|
||||
if (empty($openid)) $this->error("发起支付失败");
|
||||
}
|
||||
// 返回订单数据及支付发起参数
|
||||
$type = $order['amount_real'] <= 0 ? 'empty' : $data['payment_code'];
|
||||
|
@ -81,8 +81,8 @@ class RebateCurrentService extends Service
|
||||
$this->user = $this->app->db->name('DataUser')->where($map)->find();
|
||||
if (empty($this->user)) throw new Exception('用户不存在');
|
||||
// 获取推荐用户
|
||||
if ($this->order['from'] > 0) {
|
||||
$map = ['id' => $this->order['from']];
|
||||
if ($this->order['puid1'] > 0) {
|
||||
$map = ['id' => $this->order['puid1']];
|
||||
$this->fromer = $this->app->db->name('DataUser')->where($map)->find();
|
||||
if (empty($this->fromer)) throw new Exception('推荐不存在');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user