liugc пре 9 месеци
родитељ
комит
066dc940df
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      app/api/service/DouYinService.php

+ 3 - 1
app/api/service/DouYinService.php

@@ -344,6 +344,7 @@ class DouYinService
 
                 $douyinOrder = DouyinOrder::where(['user_id'=>$params['user_id'],'dy_order_id'=>$douyinOrderId])->findOrEmpty();
                 $rechargeOrder = RechargeOrder::where(['work_id'=>$douyinOrder->work_id,'payment_type'=>2])->findOrEmpty();
+                if(empty($rechargeOrder->order_amount)) throw new \Exception('尾款报价不存在!');
                 $data['skuList'] = [
                     [
                         "quantity" => (int)$quantity,
@@ -362,7 +363,8 @@ class DouYinService
 
                 $data['callbackUrl'] = env('douyin.pay_tail_notify_url')??'';
                 $data['tradeOption'] = [
-                    //"life_trade_flag" => 1,
+                    "life_trade_flag" => 1,
+                    "trade_mode" => '3',
                     "order_relation_info" => [
                         "related_order_id" => (string)$douyinOrderId?:'', // 加价时上个订单号
                         "relation_type" => 'multi_buy_as_one'