do add weixin pay call api auth sign
Showing
1 changed file
with
4 additions
and
1 deletions
@@ -856,9 +856,12 @@ class HomeController extends AbstractAction | @@ -856,9 +856,12 @@ class HomeController extends AbstractAction | ||
856 | 856 | ||
857 | $totalFee = intval(strtr($orderDetail['data']['amount'], array('¥' => ''))) * 100; | 857 | $totalFee = intval(strtr($orderDetail['data']['amount'], array('¥' => ''))) * 100; |
858 | $openId = $this->getSession('weixinOpenId'); | 858 | $openId = $this->getSession('weixinOpenId'); |
859 | + if (empty($openId)) { | ||
860 | + break; | ||
861 | + } | ||
859 | 862 | ||
860 | - $tools = new JsApiPay(); | ||
861 | //统一下单 | 863 | //统一下单 |
864 | + $tools = new JsApiPay(); | ||
862 | $input = new WxPayUnifiedOrder(); | 865 | $input = new WxPayUnifiedOrder(); |
863 | $input->SetBody('有货订单号:' . $orderCode); | 866 | $input->SetBody('有货订单号:' . $orderCode); |
864 | $input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号 | 867 | $input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号 |
-
Please register or login to post a comment