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

支付宝

@@ -194,7 +194,6 @@ class IndexController extends HomeBaseController @@ -194,7 +194,6 @@ class IndexController extends HomeBaseController
194 require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php'; 194 require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php';
195 //require dirname(__FILE__) . DIRECTORY_SEPARATOR . './../config.php'; 195 //require dirname(__FILE__) . DIRECTORY_SEPARATOR . './../config.php';
196 if (1 == 1) { 196 if (1 == 1) {
197 - echo 1;  
198 //商户订单号,商户网站订单系统中唯一订单号,必填 197 //商户订单号,商户网站订单系统中唯一订单号,必填
199 $out_trade_no = '2018101721025641'; 198 $out_trade_no = '2018101721025641';
200 199
@@ -210,7 +209,7 @@ class IndexController extends HomeBaseController @@ -210,7 +209,7 @@ class IndexController extends HomeBaseController
210 //超时时间 209 //超时时间
211 $timeout_express = "1m"; 210 $timeout_express = "1m";
212 211
213 - $payRequestBuilder = new AlipayTradeWapPayContentBuilder(); 212 + $payRequestBuilder = new \AlipayTradeWapPayContentBuilder();
214 $payRequestBuilder->setBody($body); 213 $payRequestBuilder->setBody($body);
215 $payRequestBuilder->setSubject($subject); 214 $payRequestBuilder->setSubject($subject);
216 $payRequestBuilder->setOutTradeNo($out_trade_no); 215 $payRequestBuilder->setOutTradeNo($out_trade_no);
@@ -226,7 +225,7 @@ class IndexController extends HomeBaseController @@ -226,7 +225,7 @@ class IndexController extends HomeBaseController
226 'sign_type' => 'RSA' 225 'sign_type' => 'RSA'
227 ]; 226 ];
228 227
229 - $payResponse = new AlipayTradeService($config); 228 + $payResponse = new \AlipayTradeService($config);
230 $result = $payResponse->wapPay($payRequestBuilder, $config['return_url'], $config['notify_url']); 229 $result = $payResponse->wapPay($payRequestBuilder, $config['return_url'], $config['notify_url']);
231 230
232 print_r($result); 231 print_r($result);