diff --git a/platformapi/recharge_phone_bill/recharge_api.go b/platformapi/recharge_phone_bill/recharge_api.go index bbf63072..e9f2ab31 100644 --- a/platformapi/recharge_phone_bill/recharge_api.go +++ b/platformapi/recharge_phone_bill/recharge_api.go @@ -38,7 +38,7 @@ func New(password, account, secret string, config ...*platformapi.APIConfig) *AP // 大写( md5( md5(密码)+手机号码+产品编码+商户订单号+秘钥 ) ) 话费充值签名接口 func (a *API) signParam(params map[string]interface{}) (sig string) { paramsSign := "" - if params["mobile"] != "" && params["flowCode"] != "" && params["orderNumber"] != "" { + if params["mobile"] != "" && params["flowCode"] != "" && params["orderNumber"] != "" && params["mobile"] != nil && params["flowCode"] != nil && params["orderNumber"] != nil { paramsSign = params["mobile"].(string) + params["flowCode"].(string) + params["orderNumber"].(string) } md5Password := fmt.Sprintf("%X", fmt.Sprintf("%X", md5.Sum([]byte(a.password)))+paramsSign+a.secret)