Authored by hf

do add union codes

@@ -854,13 +854,13 @@ class HomeController extends AbstractAction @@ -854,13 +854,13 @@ class HomeController extends AbstractAction
854 break; 854 break;
855 } 855 }
856 856
857 - $totalFee = strtr($orderDetail['data']['amount'], array('¥' => '')); 857 + $totalFee = intval(strtr($orderDetail['data']['amount'], array('¥' => ''))) * 100;
858 $openId = $this->getSession('weixinOpenId'); 858 $openId = $this->getSession('weixinOpenId');
859 859
860 $tools = new JsApiPay(); 860 $tools = new JsApiPay();
861 //统一下单 861 //统一下单
862 $input = new WxPayUnifiedOrder(); 862 $input = new WxPayUnifiedOrder();
863 - $input->SetBody($orderDetail['data']['product_name']); 863 + $input->SetBody('有货订单号:' . $orderCode);
864 $input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号 864 $input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号
865 $input->SetTotal_fee($totalFee); 865 $input->SetTotal_fee($totalFee);
866 $input->SetTime_start(date("YmdHis", (int) $orderDetail['data']['create_time'])); 866 $input->SetTime_start(date("YmdHis", (int) $orderDetail['data']['create_time']));
@@ -159,7 +159,7 @@ routes.cart.type = "rewrite" @@ -159,7 +159,7 @@ routes.cart.type = "rewrite"
159 routes.cart.match = "/home/orders/detail$" 159 routes.cart.match = "/home/orders/detail$"
160 routes.cart.route.module = Index 160 routes.cart.route.module = Index
161 routes.cart.route.controller = Home 161 routes.cart.route.controller = Home
162 -routes.cart.route.action = homedetail 162 +routes.cart.route.action = Orderdetail
163 163
164 ; 微信支付接口 164 ; 微信支付接口
165 routes.weixinapi.type = "rewrite" 165 routes.weixinapi.type = "rewrite"