Authored by hf

fixes some bugs to weixin pay

... ... @@ -819,14 +819,14 @@ class HomeController extends AbstractAction
public function weixinapiAction()
{
do {
if (!$this->isAjax()) {
break;
}
$uid = $this->getUid(true);
if (!$uid) {
break;
}
// if (!$this->isAjax()) {
// break;
// }
//
// $uid = $this->getUid(true);
// if (!$uid) {
// break;
// }
$orderCode = $this->get('order_code');
if (empty($orderCode)) {
... ... @@ -838,10 +838,11 @@ class HomeController extends AbstractAction
break;
}
$result['data'] = isset($result['data']['prePayData']) ? $result['data']['prePayData'] : array();
$result['data']['appId'] = 'wx049fdaa3ba9cdd7a'; //'wx75e5a7c0c88e45c2';
$result['data']['signType'] = 'MD5';
$result['data']['paySign'] = isset($result['data']['sign']) ? $result['data']['sign'] : '';
$this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => $result['data'])) );
}
while (false);
... ...