正在显示
1 个修改的文件
包含
1 行增加
和
36 行删除
@@ -1857,16 +1857,7 @@ class Car extends Base | @@ -1857,16 +1857,7 @@ class Car extends Base | ||
1857 | "commission_price"=>$rebook_fee, | 1857 | "commission_price"=>$rebook_fee, |
1858 | ]; | 1858 | ]; |
1859 | $this->success("222请求成功", $data); | 1859 | $this->success("222请求成功", $data); |
1860 | - }else if($newrefund_time>3600 & $newrefund_time<7200){ | ||
1861 | - $pay_fee = bcmul($order['price'],0.2,2); | ||
1862 | - $rebook_fee = $pay_fee; | ||
1863 | - }else if($newrefund_time>7200 & $newrefund_time<28800){ | ||
1864 | - $pay_fee = bcmul($order['price'],0.1,2); | ||
1865 | - $rebook_fee = $pay_fee; | ||
1866 | - }else if($newrefund_time>28800 & $newrefund_time<43200){ | ||
1867 | - $pay_fee = bcmul($order['price'],0.1,2); | ||
1868 | - $rebook_fee = $pay_fee; | ||
1869 | - }else if($newrefund_time>43200){ | 1860 | + }else if( $newrefund_time<43200 & $newrefund_time>43200){ |
1870 | $pay_fee = $order['price']; | 1861 | $pay_fee = $order['price']; |
1871 | $rebook_fee = 0; | 1862 | $rebook_fee = 0; |
1872 | $res = Db::name("order")->where("id",$id)->update([ | 1863 | $res = Db::name("order")->where("id",$id)->update([ |
@@ -1883,32 +1874,6 @@ class Car extends Base | @@ -1883,32 +1874,6 @@ class Car extends Base | ||
1883 | $this->success("333请求成功", $data); | 1874 | $this->success("333请求成功", $data); |
1884 | } | 1875 | } |
1885 | } | 1876 | } |
1886 | - $res = Db::name("order")->where("id",$id)->update([ | ||
1887 | - "commission_price"=>$rebook_fee, | ||
1888 | - "rebook"=>1, | ||
1889 | - "order_no" => getOrderSn(), | ||
1890 | - "reservation_time" => $reservation_time, | ||
1891 | - ]); | ||
1892 | - $neworder=Db::name("order")->where("id", $id)->find(); | ||
1893 | - $userinfo = Db::name('user') | ||
1894 | - ->where(['id' => $this->auth->id]) | ||
1895 | - ->field('id,wx_xcx_openid') | ||
1896 | - ->find(); | ||
1897 | - $notifyURI = $this->doman . '/addons/epay/api/OrderPayNtf'; | ||
1898 | - $params = [ | ||
1899 | - 'amount' => $neworder['commission_price'], | ||
1900 | - 'orderid' => $neworder['order_no'], | ||
1901 | - 'type' => 'wechat', | ||
1902 | - 'notifyurl' => $notifyURI, | ||
1903 | - 'method' => 'miniapp', | ||
1904 | - 'openid' => $userinfo['wx_xcx_openid'], | ||
1905 | - ]; | ||
1906 | - $f = \addons\epay\library\Service::submitOrder($params); | ||
1907 | - $data=[ | ||
1908 | - "pay"=>$f, | ||
1909 | - "commission_price"=>$neworder['commission_price'], | ||
1910 | - ]; | ||
1911 | - $this->success("123请求成功", $data); | ||
1912 | } catch (UploadException $e) { | 1877 | } catch (UploadException $e) { |
1913 | $this->error($e->getMessage()); | 1878 | $this->error($e->getMessage()); |
1914 | } | 1879 | } |
-
请 注册 或 登录 后发表评论