优化结构

This commit is contained in:
Yvan
2026-08-28 13:56:12 +08:00
parent 33ba777137
commit 56f9440a6b
32 changed files with 159 additions and 270 deletions
+1 -1
View File
@@ -411,7 +411,7 @@ func paymentCreateRequiresNotifyURL(provider string, extra, config map[string]an
if value == "" {
value = paymentkit.FirstText(config, keys...)
}
normalized := strings.NewReplacer(".", "_", "-", "_", " ", "_").Replace(strings.ToLower(strings.TrimSpace(value)))
normalized := paymentkit.NormalizePaymentMethod(value)
switch provider {
case bizpayment.PaymentAlipay, bizpayment.PaymentAlipayV3:
return !paymentkit.ContainsFold([]string{"pay", "trade_pay", "alipay_trade_pay", "barcode", "barcode_pay", "micropay", "face_to_face"}, normalized)