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

支付宝

@@ -164,7 +164,7 @@ class IndexController extends HomeBaseController @@ -164,7 +164,7 @@ class IndexController extends HomeBaseController
164 public function alipay() 164 public function alipay()
165 { 165 {
166 require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php'; 166 require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
167 - $params = [ 167 + $builder = [
168 'WIDsubject' => '购买', 168 'WIDsubject' => '购买',
169 'WIDout_trade_no' => '20181017256210', 169 'WIDout_trade_no' => '20181017256210',
170 'WIDtotal_amount' => 0.01, 170 'WIDtotal_amount' => 0.01,
@@ -180,7 +180,7 @@ class IndexController extends HomeBaseController @@ -180,7 +180,7 @@ class IndexController extends HomeBaseController
180 'sign_type' => 'RSA' 180 'sign_type' => 'RSA'
181 ]; 181 ];
182 $alipay = new \AlipayTradeService($alipay_config); 182 $alipay = new \AlipayTradeService($alipay_config);
183 - $return = $alipay->wapPay($params, '', ''); 183 + $return = $alipay->wapPay($builder, '', '');
184 print_r($return); 184 print_r($return);
185 } 185 }
186 186