- phpcbf 自动修复 3893 处格式问题 - 添加 phpcs.xml 排除不适用的规则 - 安全相关规则降级为 warning 保持可见 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
941 B
PHP
Executable file
23 lines
941 B
PHP
Executable file
<?php
|
|
require_once 'inc/easypay.config.php';
|
|
|
|
if ( isset( $_GET['para'] ) ) {
|
|
$para = json_decode( $_GET['para'], true );
|
|
$alipay_gateway_new = $alipay_config['apiurl'] . 'submit.php?';
|
|
|
|
// 使用 GET 或 POST 方法来确定 $method 的值
|
|
$method = isset( $_POST['method'] ) ? $_POST['method'] : ( isset( $_GET['method'] ) ? $_GET['method'] : 'post' );
|
|
|
|
// 创建表单并使用 foreach 替代 each
|
|
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='" . $alipay_gateway_new . '_input_charset=' . trim( strtolower( $alipay_config['input_charset'] ) ) . "' method='" . $method . "'>";
|
|
|
|
foreach ( $para as $key => $val ) {
|
|
$sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
|
|
}
|
|
|
|
// submit 按钮控件请不要含有 name 属性
|
|
$sHtml .= "<input type='submit' value='正在跳转'></form>";
|
|
$sHtml .= "<script>document.forms['alipaysubmit'].submit();</script>";
|
|
|
|
echo $sHtml;
|
|
}
|