Ver código fonte

订单详情返回oid,type字段

family 1 ano atrás
pai
commit
e95823ae9f
1 arquivos alterados com 4 adições e 2 exclusões
  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
         if ($orderinfo['paid'] == 0 && $orderinfo['status'] == 3) throw new ValidateException('订单已取消');
272
         if ($orderinfo['paid'] == 0 && $orderinfo['status'] == 3) throw new ValidateException('订单已取消');
273
         if ($orderinfo['paid'] == 1) throw new ValidateException('订单已支付');
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
         Db::name('log')->insert(['data' => '汇付电影票订单支付--- 返回参数' . json_encode($res)]);
276
         Db::name('log')->insert(['data' => '汇付电影票订单支付--- 返回参数' . json_encode($res)]);
277
         if (isset($res['id'])) {
277
         if (isset($res['id'])) {
278
             $type = 0;
278
             $type = 0;
@@ -467,7 +467,7 @@ class MovieRepository extends BaseRepository
467
                 unset($params['fee_mode']);
467
                 unset($params['fee_mode']);
468
             }
468
             }
469
             return $this->Payment_create_traits_b($params, $type, $key);
469
             return $this->Payment_create_traits_b($params, $type, $key);
470
-        } elseif ($payType == 'ALI') {
470
+        } elseif ($payType == 'ali') {
471
             $member_id = 0;
471
             $member_id = 0;
472
             $type = '1';
472
             $type = '1';
473
             $pay_channel = 'alipay_qr';
473
             $pay_channel = 'alipay_qr';
@@ -522,6 +522,8 @@ class MovieRepository extends BaseRepository
522
         $result = DouHuoMallFilmApiRequest::getOrderInfo($order_sn);
522
         $result = DouHuoMallFilmApiRequest::getOrderInfo($order_sn);
523
         if (!empty($result) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
523
         if (!empty($result) && ($result['code'] == ApiResponseService::DEFAULT_SUCCESS_CODE)) {
524
             $plat_orderinfo = $result['data'];
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
             $plat_orderinfo['order_price'] = $orderinfo['order_price'];
527
             $plat_orderinfo['order_price'] = $orderinfo['order_price'];
526
             $plat_orderinfo['order_sn'] = $order_sn;
528
             $plat_orderinfo['order_sn'] = $order_sn;
527
             $plat_orderinfo['create_time'] = strtotime($orderinfo['create_time']);
529
             $plat_orderinfo['create_time'] = strtotime($orderinfo['create_time']);