Browse Source

订单详情返回oid,type字段

family 1 year ago
parent
commit
e95823ae9f
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app/common/repositories/movie/MovieRepository.php

+ 4 - 2
app/common/repositories/movie/MovieRepository.php

@@ -272,7 +272,7 @@ class MovieRepository extends BaseRepository
272 272
         if ($orderinfo['paid'] == 0 && $orderinfo['status'] == 3) throw new ValidateException('订单已取消');
273 273
         if ($orderinfo['paid'] == 1) throw new ValidateException('订单已支付');
274 274
 
275
-        $res = $this->movie_pay($pay_type, $code, $userinfo['wechat_user_id'], $orderinfo, $orderinfo['film_name'], env('APP_URL') . "/api/hf_notify/movie", 'delay');
275
+        $res = $this->movie_pay(strtolower($pay_type), $code, $userinfo['wechat_user_id'], $orderinfo, $orderinfo['film_name'], env('APP_URL') . "/api/hf_notify/movie", 'delay');
276 276
         Db::name('log')->insert(['data' => '汇付电影票订单支付--- 返回参数' . json_encode($res)]);
277 277
         if (isset($res['id'])) {
278 278
             $type = 0;
@@ -467,7 +467,7 @@ class MovieRepository extends BaseRepository
467 467
                 unset($params['fee_mode']);
468 468
             }
469 469
             return $this->Payment_create_traits_b($params, $type, $key);
470
-        } elseif ($payType == 'ALI') {
470
+        } elseif ($payType == 'ali') {
471 471
             $member_id = 0;
472 472
             $type = '1';
473 473
             $pay_channel = 'alipay_qr';
@@ -522,6 +522,8 @@ class MovieRepository extends BaseRepository
522 522
         $result = DouHuoMallFilmApiRequest::getOrderInfo($order_sn);
523 523
         if (!empty($result) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
524 524
             $plat_orderinfo = $result['data'];
525
+            $plat_orderinfo['oid'] = $orderinfo['order_id'];
526
+            $plat_orderinfo['type'] = ($orderinfo['pay_type'] == 1) ? 'wx' : ($orderinfo['pay_type'] == 2 ? 'ali' : 'wx');
525 527
             $plat_orderinfo['order_price'] = $orderinfo['order_price'];
526 528
             $plat_orderinfo['order_sn'] = $order_sn;
527 529
             $plat_orderinfo['create_time'] = strtotime($orderinfo['create_time']);