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' => [