1
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user