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

支付宝

@@ -163,12 +163,15 @@ class IndexController extends HomeBaseController @@ -163,12 +163,15 @@ class IndexController extends HomeBaseController
163 163
164 public function alipay() 164 public function alipay()
165 { 165 {
  166 + require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
166 $params = [ 167 $params = [
167 'subject' => '购买', 168 'subject' => '购买',
168 'out_trade_no' => '20181017256210', 169 'out_trade_no' => '20181017256210',
169 'total_amount' => 0.01, 170 'total_amount' => 0.01,
170 ]; 171 ];
171 - $return = \alipay\Wappay::pay($params); 172 +
  173 + $alipay = new \AlipayTradeService();
  174 + $return = $alipay->wapPay('', '', '');
172 print_r($return); 175 print_r($return);
173 } 176 }
174 177