From c78405496f32b519b92fe4b9e872a4470cc575f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D?= <邮箱> Date: Wed, 2 Aug 2023 09:17:38 +0800 Subject: [PATCH] test --- mobile/dalianpay/config/config.php | 6 ++++-- mobile/dalianpay/demo/pay.php | 15 +++++++++------ mobile/plugins/payment/wxpay.php | 18 +++++++++--------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/mobile/dalianpay/config/config.php b/mobile/dalianpay/config/config.php index 48b5c54..97e7f5b 100644 --- a/mobile/dalianpay/config/config.php +++ b/mobile/dalianpay/config/config.php @@ -1,10 +1,12 @@ '5503001', - // 商户号 + // 'org_num' => '100018380507D2C', + // 商户号 渠道商户号 'cusid' => '10147', + // 'cusid' => '563222080502LGB', // 产品 'producp' => 'JX0002', // 版本 diff --git a/mobile/dalianpay/demo/pay.php b/mobile/dalianpay/demo/pay.php index 96506bf..d74ec6a 100644 --- a/mobile/dalianpay/demo/pay.php +++ b/mobile/dalianpay/demo/pay.php @@ -33,16 +33,19 @@ 'orgid' => $config['org_num'], 'cusid' => $config['cusid'], 'branchno' => $config['branchno'], - 'termcode' => $config['termcode'], + // 'termcode' => $config['termcode'], 'version' => $config['version'], - 'trxamt' => '1', - 'reqsn' => uniqid($reqsn_prefix), + 'trxamt' => '1', // total_fee + 'reqsn' => uniqid($reqsn_prefix), // 交易订单号 'producp' => 'JX0002', - 'transtype' => 'JSP511', - 'paytype' => 'W02', + 'transtype' => 'JSP501', // 微信支付 + 'paytype' => 'W02', // 微信js支付 'randomstr' => md5( uniqid() ), - 'body' => 'pages', + // 'body' => 'pages', 'acct' => $openid, + 'notify_url' => '', // 交易结果通知地址 + 'sub_appid' => 'wx79343915f99167e6', + 'front_url' => '', // 支付完成跳转 ); // 生成签名 diff --git a/mobile/plugins/payment/wxpay.php b/mobile/plugins/payment/wxpay.php index f32a4f2..e97d027 100755 --- a/mobile/plugins/payment/wxpay.php +++ b/mobile/plugins/payment/wxpay.php @@ -198,16 +198,16 @@ class wxpay } // 访问大连支付接口 - // $url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; - // var_dump($url); - // $_SESSION['prev_url'] = $url; - // var_dump($_SESSION['prev_url']); - // header('Location: https://shop.heavenk.com/mobile/dalianpay/demo/pay.php'); + $url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + var_dump($url); + $_SESSION['prev_url'] = $url; + var_dump($_SESSION['prev_url']); + header('Location: https://shop.heavenk.com/mobile/dalianpay/demo/pay.php'); // // header('Location: https://www.baidu.com'); - // exit; // 终止当前脚本的执行,确保页面跳转生效 - require_once('../../demo/pay.php'); - $response_data = pay(); - echo $response_data; + exit; // 终止当前脚本的执行,确保页面跳转生效 + // require_once('../../demo/pay.php'); + // $response_data = pay(); + // echo $response_data; // 处理dalianpay统一支付接口传回的参数 // $_SESSION['response_data_json']