小程序微信后台和代理后台使用同一个域名

This commit is contained in:
2026-04-14 00:12:00 +08:00
parent a7c2448207
commit fbd10ad1f9
112 changed files with 510 additions and 405 deletions

View File

@@ -1,6 +1,8 @@
<?php
/// https://api.tscce.cn/sample/onlinepay/test.php
require_once dirname(dirname(dirname(__DIR__))) . '/env_config.php';
/// sample/onlinepay/test.php
define('USEDCHARSET', 'utf-8');
$_api_base = env('SDK_API_URL');
/// 这里定义公共变量
$app_id = '14992192722868'; /// appid
@@ -230,7 +232,7 @@ $return_url = dirname(getLocaleUrl()) . '/return.php'; /// 通知页面地址
/// 登录
$url = 'https://api.tscce.cn/api/login/ylnn';
$url = $_api_base . '/api/login/ylnn';
$data = array(
'appid' => $app_id, /// appid
'devkey' => $dev_key, /// 开发者key
@@ -266,7 +268,7 @@ $tdy_token = 1;
</head>
<body>
<form style="display:none;" id="frm" name="frm" method="post" action="https://api.tscce.cn/api/newpay/pay/online/">
<form style="display:none;" id="frm" name="frm" method="post" action="<?php echo $_api_base; ?>/api/newpay/pay/online/">
<input name="appid" type="text" value="<?php echo $app_id; ?>" />
<input name="devkey" type="text" value="<?php echo $dev_key; ?>" />
<input name="sid" type="text" value="<?php echo $sid; ?>" />
@@ -302,7 +304,7 @@ $tdy_token = 1;
frmPost.id = '____frmPost____';
frmPost.name = '____frmPost____';
frmPost.method = 'post';
frmPost.action = 'https://api.tscce.cn/api/newpay/pay/online/';
frmPost.action = $_api_base . '/api/newpay/pay/online/';
var add_formchild = function (name, value) {
var edt = document.createElement('input');
edt.type = 'text';