| | |
| | | /** |
| | | * 创建订单 |
| | | */ |
| | | public function createOrder($user, $supplier) |
| | | public function createOrder($user, $supplier,$result) |
| | | { |
| | | if($supplier['status'] != 20){ |
| | | $this->error = '您已支付保证金'; |
| | |
| | | $data = [ |
| | | 'order_no' => $this->orderNo(), |
| | | 'user_id' => $user['user_id'], |
| | | 'pay_source' => 'wx', |
| | | 'pay_price' => $price, |
| | | 'deposit_price' => $price, |
| | | 'app_id' => self::$app_id, |
| | | ]; |
| | | if ($result['data']['order_id'] > 0){ |
| | | $data['member_order_id'] = $result['data']['order_id']; |
| | | $data['pay_price']=bcadd($price,$result['data']['price'],2); |
| | | $data['member_price']=$result['data']['price']; |
| | | } |
| | | $this->save($data); |
| | | } |
| | | return $this['order_id']; |