fix: update payment method handling in topup controller

- Refactored payment method validation to check against available methods.
- Changed payment method types from "zfb" to "alipay" and "wx" to "wxpay" for consistency.
- Updated the purchase request to use the validated payment method directly.
This commit is contained in:
CaIon
2025-06-20 17:48:55 +08:00
parent 8b209d8926
commit a1a7ddbc83
2 changed files with 8 additions and 10 deletions

View File

@@ -13,12 +13,12 @@ var PayMethods = []map[string]string{
{
"name": "支付宝",
"color": "rgba(var(--semi-blue-5), 1)",
"type": "zfb",
"type": "alipay",
},
{
"name": "微信",
"color": "rgba(var(--semi-green-5), 1)",
"type": "wx",
"type": "wxpay",
},
}