aa
This commit is contained in:
@@ -29,12 +29,12 @@ const (
|
||||
)
|
||||
|
||||
type API struct {
|
||||
appID string
|
||||
cusID string
|
||||
appKey string
|
||||
subAppid string
|
||||
client *http.Client
|
||||
config *platformapi.APIConfig
|
||||
appID string
|
||||
cusID string
|
||||
appKey string
|
||||
|
||||
client *http.Client
|
||||
config *platformapi.APIConfig
|
||||
}
|
||||
|
||||
type CreateUnitorderOrderParam struct {
|
||||
@@ -110,18 +110,17 @@ type CreateH5UnitorderOrderParam struct {
|
||||
Body string `json:"body"`
|
||||
}
|
||||
|
||||
func New(appID, appKey, cusID, subAppid string, config ...*platformapi.APIConfig) *API {
|
||||
func New(appID, appKey, cusID string, config ...*platformapi.APIConfig) *API {
|
||||
curConfig := platformapi.DefAPIConfig
|
||||
if len(config) > 0 {
|
||||
curConfig = *config[0]
|
||||
}
|
||||
return &API{
|
||||
appID: appID,
|
||||
appKey: appKey,
|
||||
cusID: cusID,
|
||||
subAppid: subAppid,
|
||||
client: &http.Client{Timeout: curConfig.ClientTimeout},
|
||||
config: &curConfig,
|
||||
appID: appID,
|
||||
appKey: appKey,
|
||||
cusID: cusID,
|
||||
client: &http.Client{Timeout: curConfig.ClientTimeout},
|
||||
config: &curConfig,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,12 +148,6 @@ func (a *API) AccessAPI(action string, bizParams map[string]interface{}) (retVal
|
||||
params["randomstr"] = utils.GetUUID()
|
||||
params["version"] = "12"
|
||||
params = utils.MergeMaps(params, bizParams)
|
||||
if action == sepcAction {
|
||||
// params["paytype"] = payType
|
||||
if bizParams["paytype"] == PayTypeWxXcx {
|
||||
params["sub_appid"] = a.subAppid
|
||||
}
|
||||
}
|
||||
signStr := a.signParam(params)
|
||||
params["sign"] = signStr
|
||||
var fullURL string
|
||||
|
||||
Reference in New Issue
Block a user