优化结构
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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[:]...)
|
||||
}
|
||||
Reference in New Issue
Block a user