From fec6d9a19e53bd0b7f64ebb1ed84b3c9151b54bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 25 Nov 2022 14:22:08 +0800 Subject: [PATCH] 1 --- platformapi/recharge_phone_bill/recharge_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)