From 854fe2c3fc8e51362f2dfcc6d5fa64e7f17ea831 Mon Sep 17 00:00:00 2001 From: sszdot Date: Tue, 17 Dec 2024 12:01:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afactor=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B=E3=80=91=EF=BC=9A?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=94=AF=E4=BB=98=E8=AE=A2=E5=8D=95=20?= =?UTF-8?q?=E4=BB=85=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC+=E6=89=93?= =?UTF-8?q?=E5=8C=85=E8=B4=B9+=E8=BF=90=E8=B4=B9=20=E3=80=90=E5=BD=B1=20?= =?UTF-8?q?=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FlyCube/Api/Controller/PayController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FlyCube/Api/Controller/PayController.class.php b/FlyCube/Api/Controller/PayController.class.php index 56a350f..99d6b66 100644 --- a/FlyCube/Api/Controller/PayController.class.php +++ b/FlyCube/Api/Controller/PayController.class.php @@ -53,7 +53,7 @@ class PayController extends PublicController //获取订单信息 $where['order_sn'] = $_REQUEST['order_sn']; - $field = array('order_sn,shop_id,total_price,total_weight,openid'); + $field = array('order_sn,shop_id,total_price,total_weight,openid,transport_price,pack_price'); $orderDb = D('order'); if (!$order = $orderDb->where($where)->field($field)->find()) { echo json_encode(array('status' => 0, 'msg' => '订单不存在')); @@ -78,7 +78,7 @@ class PayController extends PublicController 'description' => '餐品', //存商品名称吧 后期在做调整 'attach' => strval($order['shop_id']), // 将 shop_id 转为字符串 回调中用来发mqtt的主题 'amount' => [ - 'total' => $order['total_price'] * 100, //单位:分 + 'total' => ($order['total_price'] + $order['transport_price'] + $order['pack_price']) * 100, //单位:分 'currency' => 'CNY', ], 'payer' => [