作者 lihan
1 个管道 的构建 通过 耗费 0 秒

支付宝

@@ -169,7 +169,7 @@ class IndexController extends HomeBaseController @@ -169,7 +169,7 @@ class IndexController extends HomeBaseController
169 require EXTEND_PATH . '/alipay/config.php'; 169 require EXTEND_PATH . '/alipay/config.php';
170 if (1 == 1) { 170 if (1 == 1) {
171 //商户订单号,商户网站订单系统中唯一订单号,必填 171 //商户订单号,商户网站订单系统中唯一订单号,必填
172 - $out_trade_no = '20181017210243564'.rand(10000, 99999); 172 + $out_trade_no = '20181017210243564' . rand(10000, 99999);
173 173
174 //订单名称,必填 174 //订单名称,必填
175 $subject = '购买'; 175 $subject = '购买';
@@ -191,9 +191,11 @@ class IndexController extends HomeBaseController @@ -191,9 +191,11 @@ class IndexController extends HomeBaseController
191 $payRequestBuilder->setTimeExpress($timeout_express); 191 $payRequestBuilder->setTimeExpress($timeout_express);
192 192
193 $payResponse = new \AlipayTradeService($config); 193 $payResponse = new \AlipayTradeService($config);
194 - $result = $payResponse->wapPay($payRequestBuilder, $config['return_url'], $config['notify_url']);  
195 -  
196 - return ; 194 + if (cmf_is_wechat()) {
  195 + echo 1;
  196 + } else {
  197 + $result = $payResponse->wapPay($payRequestBuilder, $config['return_url'], $config['notify_url']);
  198 + }
197 } 199 }
198 } 200 }
199 201