diff --git a/app/controller/Wechat.php b/app/controller/Wechat.php index b757183..f075d08 100644 --- a/app/controller/Wechat.php +++ b/app/controller/Wechat.php @@ -118,12 +118,12 @@ class Wechat 'order_id' => $order->id, ]); - $config = Config::get('wechat.payment'); - $payment = Factory::payment($config); - $unify = $payment->order->unify([ + $config = Config::get('wechat.payment'); + $payment = Factory::payment($config); + $unify = $payment->order->unify([ 'body' => '商品订单', 'out_trade_no' => $outTradeNo, - 'total_fee' => 100, + 'total_fee' => $order->amount * 100, 'notify_url' => $notifyUrl, 'trade_type' => 'JSAPI', 'openid' => $user->openid,