wupengfei 2 years ago
parent
commit
619dd8de29
1 changed files with 6 additions and 2 deletions
  1. 6 2
      application/api/controller/WashManage.php

+ 6 - 2
application/api/controller/WashManage.php

@@ -293,7 +293,11 @@ class WashManage extends Base
             });
             (new WashOrderItem())->insertAll($order_item);// 生成订单商品详情
             $ret_data['order_id'] = $order_info['id'];
-            if($price_total == 0)  OrderCallback::washOrderCallBack($order_info,1);
+            if($price_total == 0)
+            {
+                OrderCallback::washOrderCallBack($order_info,1);
+                $ret_data['pay_status'] = 1;
+            }
 
             Db::commit();
         }catch (\Exception $e) {
@@ -469,7 +473,7 @@ class WashManage extends Base
         $ret_data = ['pay_status'=>0,'config'=>[]];
         $notify_url = $this->request->root(true) . '/api/we_chat_pay/washOrderNotify';
         $config = WeChatPay::wxPay('订单支付',$order_info['pay_no'],$order_info['price_total'],$notify_url,'JSAPI',$user_info['openid']);
-        if(!$config)  $this->error('支付配置错误');
+        if(empty($config))  $this->error('支付配置错误');
         $ret_data['config']=$config['config'];
         $this->success('ok',$ret_data);
     }