作者 郭文星

123

@@ -1829,7 +1829,9 @@ class Car extends Base @@ -1829,7 +1829,9 @@ class Car extends Base
1829 } 1829 }
1830 if($newrefund_time<3600){ 1830 if($newrefund_time<3600){
1831 $pay_fee = $order['price']; 1831 $pay_fee = $order['price'];
1832 - $rebook_fee = $pay_fee; 1832 + $rebook_fee = 0;
  1833 + $res = Db::name("order")->update(["commission_price"=>$rebook_fee,"rebook"=>1, "order_no" => getOrderSn(),"create_time"=>time()]);
  1834 + $this->success("请求成功");
1833 }else if($newrefund_time>3600 & $newrefund_time<7200){ 1835 }else if($newrefund_time>3600 & $newrefund_time<7200){
1834 $pay_fee = $order['price']*0.8; 1836 $pay_fee = $order['price']*0.8;
1835 $rebook_fee = $pay_fee; 1837 $rebook_fee = $pay_fee;
@@ -1841,11 +1843,28 @@ class Car extends Base @@ -1841,11 +1843,28 @@ class Car extends Base
1841 $rebook_fee = $pay_fee; 1843 $rebook_fee = $pay_fee;
1842 }else if($newrefund_time<43200){ 1844 }else if($newrefund_time<43200){
1843 $pay_fee = $order['price']; 1845 $pay_fee = $order['price'];
1844 - $rebook_fee = $pay_fee;  
1845 - 1846 + $rebook_fee = 0;
  1847 + $res = Db::name("order")->update(["commission_price"=>$rebook_fee,"rebook"=>1, "order_no" => getOrderSn(),"create_time"=>time()]);
  1848 + $this->success("请求成功");
1846 } 1849 }
1847 } 1850 }
1848 - $this->success('改签成功',[$id,$reservation_time]); 1851 + $res = Db::name("order")->update(["commission_price"=>$rebook_fee,"rebook"=>1, "order_no" => getOrderSn(),"create_time"=>time()]);
  1852 + $neworder=Db::name("order")->where("id", $id)->find();
  1853 + $userinfo = Db::name('user')
  1854 + ->where(['id' => $this->auth->id])
  1855 + ->field('id,wx_xcx_openid')
  1856 + ->find();
  1857 + $notifyURI = $this->doman . '/addons/epay/api/OrderPayNtf';
  1858 + $params = [
  1859 + 'amount' => $neworder['commission_price'],
  1860 + 'orderid' => $neworder['order_no'],
  1861 + 'type' => 'wechat',
  1862 + 'notifyurl' => $notifyURI,
  1863 + 'method' => 'miniapp',
  1864 + 'openid' => $userinfo['wx_xcx_openid'],
  1865 + ];
  1866 + $f = \addons\epay\library\Service::submitOrder($params);
  1867 + $this->success("请求成功", $f);
1849 } 1868 }
1850 1869
1851 } 1870 }