wp-woocommerce-pay/inc/easypay_return.php
feibisi daf7932d59
Some checks are pending
gitleaks 密钥泄露扫描 / gitleaks (push) Waiting to run
feicode/ai-security No obvious risky pattern in latest diff
WordPress 插件 CI / ci (push) Successful in -8h1m15s
fix: phpcbf 自动修复 + phpcs.xml 代码规范配置
- phpcbf 自动修复 3893 处格式问题
- 添加 phpcs.xml 排除不适用的规则
- 安全相关规则降级为 warning 保持可见

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-18 15:19:03 +08:00

25 lines
655 B
PHP
Executable file

<?php
require_once 'easypay.config.php';
require_once '../lib/epay_notify.class.php';
//计算得出通知验证结果
$alipayNotify = new AlipayNotify( $alipay_config );
$verify_result = $alipayNotify->verifyReturn();
if ( $verify_result ) {//验证成功
$out_trade_no = $_GET['out_trade_no'];
//支付宝交易号
$trade_no = $_GET['trade_no'];
//交易状态
$trade_status = $_GET['trade_status'];
//支付方式
$type = $_GET['type'];
if ( $_GET['trade_status'] == 'TRADE_SUCCESS' ) {
header( 'location:1.php' );
} else {
echo 'trade_status=' . $_GET['trade_status'];
return false;
}
} else {
echo '验证失败';
return false;
}