京东api区分vendorOrgCode

This commit is contained in:
gazebo
2019-12-09 15:16:21 +08:00
parent 211994bd97
commit ecedbe9be4
37 changed files with 172 additions and 191 deletions

View File

@@ -42,9 +42,11 @@ func (a *APIManager) GetAPI(vendorID int, appOrgCode string) (pfAPI interface{})
func (a *APIManager) GetAppOrgCodeList(vendorID int) (appOrgCodeList []string) {
switch vendorID {
case model.VendorIDJD:
appOrgCodeList = []string{"320406"}
appOrgCodeList = []string{globals.JdOrgCode}
case model.VendorIDMTWM:
appOrgCodeList = []string{api.MtwmAPI.GetAppID()}
case model.VendorIDEBAI:
appOrgCodeList = []string{api.EbaiAPI.GetSource()}
}
return appOrgCodeList
}

View File

@@ -49,6 +49,8 @@ var (
DisableWXAuth1 bool
WxpayNotifyURL string
JdOrgCode string
)
func init() {
@@ -96,6 +98,7 @@ func Init() {
DisableWXAuth1 = true
WxpayNotifyURL = beego.AppConfig.DefaultString("wxpayNotifyURL", "")
JdOrgCode = beego.AppConfig.DefaultString("jdOrgCode", "")
}
func IsCallbackAlwaysReturnSuccess() bool {