diff --git a/app/api/controller/order/OrderController.php b/app/api/controller/order/OrderController.php index a436e98f1..0d6e336ff 100644 --- a/app/api/controller/order/OrderController.php +++ b/app/api/controller/order/OrderController.php @@ -183,10 +183,11 @@ class OrderController extends BaseApiController $user=User::where('id',$this->userId)->find(); $order = OrderLogic::createOrder($cartId, $addressId, $user, $params); - if($order['pay_price'] <= 0){ - $pay_type = 3; - } + if ($order != false) { + if($order['pay_price'] <= 0){ + $pay_type = 3; + } switch ($pay_type) { case PayEnum::PURCHASE_FUNDS: //采购款支付 diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 82e4e1c33..e8eefc5cf 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -111,7 +111,7 @@ class PayNotifyLogic extends BaseLogic $user->save(); $capitalFlowDao = new CapitalFlowLogic($user); - $capitalFlowDao->userExpense('user_order_pay', 'order', $order['id'], $order['pay_price']); + $capitalFlowDao->userExpense('user_order_purchase_pay', 'order', $order['id'], $order['pay_price']); self::afterPay($order); Redis::send('push-platform-print', ['id' => $order['id']], 60); PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);