fix: 统一使用 alipay.trade.page.pay + 支付全链路测试
Some checks failed
Deploy Backend / deploy (push) Has been cancelled

- 因支付宝产品仅开通电脑网站支付,移除 mobile/desktop 切换
- 统一使用 alipay.trade.page.pay + FAST_INSTANT_TRADE_PAY
- 该接口在手机浏览器中也能跳转支付宝或显示移动端页面
- 新增 tests/payment_e2e_test.sh — 全链路支付测试脚本
This commit is contained in:
2026-07-22 20:39:57 +08:00
parent 3135f790bb
commit 65157475cb
2 changed files with 75 additions and 5 deletions

View File

@@ -187,11 +187,9 @@ fn build_alipay_form_html(
return_url: &str,
is_mobile: bool, // true=手机网站支付, false=电脑网站支付
) -> Result<String, String> {
let (method, product_code) = if is_mobile {
("alipay.trade.wap.pay", "QUICK_WAP_PAY")
} else {
("alipay.trade.page.pay", "FAST_INSTANT_TRADE_PAY")
};
// 注意:当前支付宝产品仅开通了 alipay.trade.page.pay电脑网站支付
// 该接口在手机浏览器中也能正常唤起支付宝 APP 或显示移动端页面
let (method, product_code) = ("alipay.trade.page.pay", "FAST_INSTANT_TRADE_PAY");
let biz_content = serde_json::json!({
"out_trade_no": out_trade_no,