支持官方直连支付、退款配置与套餐联动

This commit is contained in:
zhiqicloud
2026-05-20 00:21:56 +08:00
parent f5deed8709
commit 3a318a86b2
40 changed files with 4674 additions and 365 deletions
@@ -332,6 +332,7 @@ pub(super) fn classify_public_support_route(
| "/api/wallet/recharge"
| "/api/wallet/recharge/options"
| "/api/wallet/refunds"
| "/api/wallet/refunds/eligible-providers"
)
{
let route_kind = match normalized_path {
@@ -342,6 +343,7 @@ pub(super) fn classify_public_support_route(
"/api/wallet/recharge" => "list_recharge_orders",
"/api/wallet/recharge/options" => "recharge_options",
"/api/wallet/refunds" => "list_refunds",
"/api/wallet/refunds/eligible-providers" => "refund_eligible_providers",
_ => "balance",
};
Some(classified(
@@ -436,6 +438,45 @@ pub(super) fn classify_public_support_route(
"public:payment",
false,
))
} else if matches!(method, &http::Method::GET | &http::Method::POST)
&& matches!(
normalized_path,
"/api/payment/alipay/notify" | "/api/payment/alipay/notify/"
)
{
Some(classified(
"public_support",
"payment_callback",
"alipay_notify",
"public:payment",
false,
))
} else if method == http::Method::POST
&& matches!(
normalized_path,
"/api/payment/wxpay/notify" | "/api/payment/wxpay/notify/"
)
{
Some(classified(
"public_support",
"payment_callback",
"wxpay_notify",
"public:payment",
false,
))
} else if method == http::Method::POST
&& matches!(
normalized_path,
"/api/payment/stripe/webhook" | "/api/payment/stripe/webhook/"
)
{
Some(classified(
"public_support",
"payment_callback",
"stripe_webhook",
"public:payment",
false,
))
} else if matches!(method, &http::Method::GET | &http::Method::POST)
&& matches!(
normalized_path,