优化结构

This commit is contained in:
Yvan
2026-08-21 00:31:43 +08:00
parent d2fb5c11b8
commit c968f9f24e
8 changed files with 164 additions and 159 deletions
-8
View File
@@ -6,14 +6,6 @@ import (
"fmt"
)
const (
ProviderAlipay = "alipay"
ProviderAlipayV3 = "alipay-v3"
ProviderWechatV2 = "wechat-v2"
ProviderWechatV3 = "wechat-v3"
ProviderApple = "apple-iap"
)
// CallbackAck is the provider-facing HTTP acknowledgement returned after a
// payment notification is processed.
type CallbackAck struct {
+36
View File
@@ -0,0 +1,36 @@
package paymentutil
const (
ProviderAlipay = "alipay"
ProviderAlipayV3 = "alipay-v3"
ProviderWechatV2 = "wechat-v2"
ProviderWechatV3 = "wechat-v3"
ProviderApple = "apple-iap"
ProviderChinaums = "chinaums"
ProviderSFT = "sft"
ProviderSuperPay = "supper-pay"
ProviderWechatGame = "wechat-game-pay"
ProviderDouyinGame = "douyin-game-pay"
ProviderDouyin = "douyin"
ProviderQQ = "qq"
ProviderAllinPay = "allinpay"
ProviderLakala = "lakala"
ProviderPayPal = "paypal"
ProviderSaobei = "saobei"
ProviderInternal = "internal"
ModeExternal = "external"
ModeInternal = "internal"
)
var externalProviders = [...]string{
ProviderAlipay, ProviderAlipayV3, ProviderWechatV2, ProviderWechatV3, ProviderApple,
ProviderChinaums, ProviderSFT, ProviderSuperPay, ProviderWechatGame, ProviderDouyinGame,
ProviderDouyin, ProviderQQ, ProviderAllinPay, ProviderLakala, ProviderPayPal, ProviderSaobei,
}
// SupportedProviders returns a copy so callers cannot mutate the process-wide
// provider catalog.
func SupportedProviders() []string {
return append([]string(nil), externalProviders[:]...)
}