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

支付宝

... ... @@ -192,7 +192,7 @@ class IndexController extends HomeBaseController
require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php';
require EXTEND_PATH . '/alipay1/config.php';
require EXTEND_PATH . '/alipay/config.php';
if (1 == 1) {
//商户订单号,商户网站订单系统中唯一订单号,必填
$out_trade_no = '2018101721025641';
... ... @@ -216,16 +216,16 @@ class IndexController extends HomeBaseController
$payRequestBuilder->setTotalAmount($total_amount);
$payRequestBuilder->setTimeExpress($timeout_express);
$config = [
'gatewayUrl' => 'https://openapi.alipay.com/gateway.do',
'app_id' => '2018101661696470',
'merchant_private_key' => config('private_key'),
'alipay_public_key' => config('alipay_public_key'),
'charset' => 'UTF-8',
'sign_type' => 'RSA',
'return_url' => 'http://catrain.net',
'notify_url' => 'http://catrain.net'
];
// $config = [
// 'gatewayUrl' => 'https://openapi.alipay.com/gateway.do',
// 'app_id' => '2018101661696470',
// 'merchant_private_key' => config('private_key'),
// 'alipay_public_key' => config('alipay_public_key'),
// 'charset' => 'UTF-8',
// 'sign_type' => 'RSA',
// 'return_url' => 'http://catrain.net',
// 'notify_url' => 'http://catrain.net'
// ];
$payResponse = new \AlipayTradeService($config);
$result = $payResponse->wapPay($payRequestBuilder, $config['return_url'], $config['notify_url']);
... ...