Authored by 郭成尧

'wechat-fuck-alipay'

@@ -991,27 +991,32 @@ class HomeController extends AbstractAction @@ -991,27 +991,32 @@ class HomeController extends AbstractAction
991 } 991 }
992 } 992 }
993 } 993 }
  994 + $payList = array(
  995 + 0 => array(
  996 + 'appIcon' => '',
  997 + 'payLink' => Helpers::url('/shopping/pay/index', array('order_code' => $orderCode, 'payment_type' => 18)),
  998 + 'appId' => 'alipay',
  999 + 'app' => '支付宝支付',
  1000 + 'hint' => '支付宝钱包支付',
  1001 + 'subHint' => '推荐支付宝用户使用',
  1002 + ),
  1003 + 1 => array(
  1004 + 'appIcon' => '',
  1005 + 'payLink' => '',
  1006 + 'appId' => 'weixin',
  1007 + 'app' => '微信支付',
  1008 + 'hint' => '推荐使用',
  1009 + 'subHint' => '',
  1010 + ),
  1011 + );
  1012 +
  1013 + if (stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false) {
  1014 + unset($payList[0]);
  1015 + }
994 1016
995 $this->_view->display('pay', array( 1017 $this->_view->display('pay', array(
996 'payCenterPage' => true, 1018 'payCenterPage' => true,
997 - 'payAppInfo' => array(  
998 - 0 => array(  
999 - 'appIcon' => '',  
1000 - 'payLink' => Helpers::url('/shopping/pay/index', array('order_code' => $orderCode, 'payment_type' => 18)),  
1001 - 'appId' => 'alipay',  
1002 - 'app' => '支付宝支付',  
1003 - 'hint' => '支付宝钱包支付',  
1004 - 'subHint' => '推荐支付宝用户使用',  
1005 - ),  
1006 - 1 => array(  
1007 - 'appIcon' => '',  
1008 - 'payLink' => '',  
1009 - 'appId' => 'weixin',  
1010 - 'app' => '微信支付',  
1011 - 'hint' => '推荐使用',  
1012 - 'subHint' => '',  
1013 - ),  
1014 - ), 1019 + 'payAppInfo' => $payList,
1015 'hasWxShare' => $hasWxShare, 1020 'hasWxShare' => $hasWxShare,
1016 'orderCode' => $orderCode, 1021 'orderCode' => $orderCode,
1017 'orderTotal' => isset($orderDetail['goodsAmount']) ? $orderDetail['goodsAmount'] : 0, 1022 'orderTotal' => isset($orderDetail['goodsAmount']) ? $orderDetail['goodsAmount'] : 0,