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

支付宝

... ... @@ -188,8 +188,6 @@ class IndexController extends HomeBaseController
public function alipay()
{
header("Content-type: text/html; charset=utf-8");
require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php';
require EXTEND_PATH . '/alipay/config.php';
... ... @@ -216,18 +214,7 @@ 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'
// ];
$payResponse = new \AlipayTradeService($config1);
$payResponse = new \AlipayTradeService($config);
$result = $payResponse->wapPay($payRequestBuilder, $config['return_url'], $config['notify_url']);
print_r($result);
... ...