修改支付

This commit is contained in:
邹景立 2021-03-11 17:54:38 +08:00
parent db976f4f0a
commit 44e6e6b3eb
3 changed files with 4 additions and 4 deletions

View File

@ -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 = [];

View File

@ -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'];

View File

@ -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('推荐不存在');
}