mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 11:49:50 +08:00
支持官方直连支付、退款配置与套餐联动
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user