Authored by hf

code review by hf: do fixes bug to refs YW-1947 modify pay action check order is…

… pay do redirect order detail page
... ... @@ -800,6 +800,11 @@ class HomeController extends AbstractAction
$this->error();
}
/* 判断订单是否已付款, 已付款跳到订单详情页 */
if (!empty($orderDetail['isPay'])) {
$this->go(Helpers::url('/home/orderdetail', array('order_code' => $orderCode)) );
}
$hasWxShare = strpos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
if ($hasWxShare) {
$tools = new JsApiPay();
... ...
... ... @@ -152,6 +152,7 @@ class OrderModel
$result['price'] = $orderDetail['data']['amount']; // 实付金额
$result['goodsAmount'] = $orderDetail['data']['payment_amount']; // 商品总金额没有人民币符号
$result['orderCount'] = $count; // 订单总件数
$result['isPay'] = $orderDetail['data']['payment_status'] === 'Y';
}
}
... ...