From d1cf18dcdb6c9afaf96691cd2fa99dc62d05b9e3 Mon Sep 17 00:00:00 2001 From: weigang Date: Thu, 27 Aug 2020 15:56:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E8=AE=A2=E5=8D=95=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E4=BB=B7=E6=A0=BC=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/PaymentController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Controller/PaymentController.php b/app/Controller/PaymentController.php index 3b2ae51..af5cf92 100644 --- a/app/Controller/PaymentController.php +++ b/app/Controller/PaymentController.php @@ -57,11 +57,15 @@ class PaymentController extends BaseController return $this->result(ErrorCode::PAY_FAILURE, $data,'同一订单不能存在多个特价商品'); } + $payMoney = bcmul(floatval($orderMain->money), 100, 0); + if (env('APP_ENV') != 'prod') { + $payMoney = 0.01; + } + $result = $app->order->unify([ 'body' => '懒族生活 - 外卖下单', 'out_trade_no' => $orderMain->global_order_id, - 'total_fee' => bcmul(floatval($orderMain->money), 100, 0), - // 'total_fee' => 1, + 'total_fee' => $payMoney, 'notify_url' => config('site_host') . '/wechat/notify/wxminionline', 'trade_type' => 'JSAPI', 'openid' => $data['openid'],