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

支付宝

@@ -163,14 +163,12 @@ class IndexController extends HomeBaseController @@ -163,14 +163,12 @@ class IndexController extends HomeBaseController
163 163
164 public function alipay() 164 public function alipay()
165 { 165 {
166 - require_once EXTEND_PATH.'/alipaymaster/extend/alipay/Wappay.php';  
167 - $alipay = new \Wappay();  
168 $params= [ 166 $params= [
169 'subject' => '购买', 167 'subject' => '购买',
170 'out_trade_no' => '20181017256210', 168 'out_trade_no' => '20181017256210',
171 'total_amount' => 0.01, 169 'total_amount' => 0.01,
172 ]; 170 ];
173 - $return = $alipay->pay($params); 171 + $return = \alipay\Wappay::pay($params);
174 print_r($return); 172 print_r($return);
175 } 173 }
176 174
1 <?php 1 <?php
2 2
3 -//namespace alipay; 3 +namespace alipay;
4 4
5 use think\Loader; 5 use think\Loader;
6 6