From 6ae33e2c84995dadaafa17e1e8bb7236333b253a 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 14:39:02 +0800 Subject: [PATCH] test --- mobile/blank.php | 3 +++ mobile/dalianpay/config/config.php | 4 ++-- mobile/plugins/payment/wxpay.php | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mobile/blank.php b/mobile/blank.php index c077ee2..58d2868 100644 --- a/mobile/blank.php +++ b/mobile/blank.php @@ -47,7 +47,10 @@ if (!$userinfo || !isset($userinfo['openid'])) { exit; } +$_SESSION['openid'] = $openid; echo $openid; +header('Location: $referer'); +exit; // 用户授权成功,这里可以将用户信息保存到数据库中,或者进行其他操作 // var_dump($userinfo); diff --git a/mobile/dalianpay/config/config.php b/mobile/dalianpay/config/config.php index 1c1b31c..fb225cd 100644 --- a/mobile/dalianpay/config/config.php +++ b/mobile/dalianpay/config/config.php @@ -23,9 +23,9 @@ 'private_key' => dirname(__FILE__) . '/../cert/cus_private_key.pem', // 统一支付接口 测试地址 - // 'pay_url' => 'https://open.dalianpay.cn/payapi/unitorder/pay', + 'pay_url' => 'https://open.dalianpay.cn/payapi/unitorder/pay', // 统一支付接口 - 'pay_url' => 'https://epay.dalianpay.cn/payapi/unitorder/pay', + // 'pay_url' => 'https://epay.dalianpay.cn/payapi/unitorder/pay', // 统一扫码接口 测试地址 'scan_url' => 'https://open.dalianpay.cn/payapi/unitorder/scanqrpay', diff --git a/mobile/plugins/payment/wxpay.php b/mobile/plugins/payment/wxpay.php index 2dd70c7..0d4d846 100755 --- a/mobile/plugins/payment/wxpay.php +++ b/mobile/plugins/payment/wxpay.php @@ -214,12 +214,12 @@ class wxpay // $openid = $this->get_openid(); // 将当前页面url保存到$_SESSION中,供其他页面跳转 - // $url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; - // $_SESSION['prev_url'] = $url; - // header('Location: https://shop.heavenk.com/mobile/blank.php'); - // exit; // 终止当前脚本的执行,确保页面跳转生效 + $url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + $_SESSION['prev_url'] = $url; + header('Location: https://shop.heavenk.com/mobile/blank.php'); + exit; // 终止当前脚本的执行,确保页面跳转生效 // $_SESSION['openid'] = $openid; - $_SESSION['openid'] = 'oCTanxBeiVFWlekJT_GiPZM2UiGY'; //sc_test + // $_SESSION['openid'] = 'oCTanxBeiVFWlekJT_GiPZM2UiGY'; //sc_test } $order_amount = $order['order_amount'] * 100;