| | |
| | | use app\common\model\plus\business\Order as BaseOrder; |
| | | use app\common\enum\order\OrderPayStatusEnum; |
| | | use app\common\enum\order\OrderPayTypeEnum; |
| | | use app\common\model\plus\business\Business as BusinessModel; |
| | | |
| | | /** |
| | | * 名片订单模型 |
| | |
| | | { |
| | | return (new static())->where(['order_no' => $orderNo])->find(); |
| | | } |
| | | public function orderPayment($user, $order, $payType,$params) |
| | | |
| | | public function orderPayment($user, $order, $payType, $params) |
| | | { |
| | | $payment = []; |
| | | if ($params['use_balance']==1) { |
| | | if ($params['use_balance'] == 1) { |
| | | $payment = $this->onPaymentByBalance($user, $order); |
| | | } elseif ($payType == OrderPayTypeEnum::WECHAT) { |
| | | $this->onPaymentByWechat($user, $order); |
| | | $payment = $this->onPaymentByWechat($user, $order); |
| | | } else { |
| | | return $this->renderError('支付方式错误'); |
| | | } |
| | |
| | | // 获取订单详情 |
| | | $PaySuccess = new BusinessCardPaySuccessService($order['order_no']); |
| | | // 发起余额支付 |
| | | return $PaySuccess->onPaySuccess(OrderPayTypeEnum::BALANCE); |
| | | $result = $PaySuccess->onPaySuccess(OrderPayTypeEnum::BALANCE); |
| | | |
| | | return $result; |
| | | } |
| | | } |
| | | } |