Authored by hf

fixes some bugs to weixin pay

@@ -819,14 +819,14 @@ class HomeController extends AbstractAction @@ -819,14 +819,14 @@ class HomeController extends AbstractAction
819 public function weixinapiAction() 819 public function weixinapiAction()
820 { 820 {
821 do { 821 do {
822 - if (!$this->isAjax()) {  
823 - break;  
824 - }  
825 -  
826 - $uid = $this->getUid(true);  
827 - if (!$uid) {  
828 - break;  
829 - } 822 +// if (!$this->isAjax()) {
  823 +// break;
  824 +// }
  825 +//
  826 +// $uid = $this->getUid(true);
  827 +// if (!$uid) {
  828 +// break;
  829 +// }
830 830
831 $orderCode = $this->get('order_code'); 831 $orderCode = $this->get('order_code');
832 if (empty($orderCode)) { 832 if (empty($orderCode)) {
@@ -838,10 +838,11 @@ class HomeController extends AbstractAction @@ -838,10 +838,11 @@ class HomeController extends AbstractAction
838 break; 838 break;
839 } 839 }
840 840
  841 + $result['data'] = isset($result['data']['prePayData']) ? $result['data']['prePayData'] : array();
841 $result['data']['appId'] = 'wx049fdaa3ba9cdd7a'; //'wx75e5a7c0c88e45c2'; 842 $result['data']['appId'] = 'wx049fdaa3ba9cdd7a'; //'wx75e5a7c0c88e45c2';
842 $result['data']['signType'] = 'MD5'; 843 $result['data']['signType'] = 'MD5';
843 $result['data']['paySign'] = isset($result['data']['sign']) ? $result['data']['sign'] : ''; 844 $result['data']['paySign'] = isset($result['data']['sign']) ? $result['data']['sign'] : '';
844 - 845 +
845 $this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => $result['data'])) ); 846 $this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => $result['data'])) );
846 } 847 }
847 while (false); 848 while (false);