|
|
|
@ -40,8 +40,6 @@ type SmsCaptchaResForTencentSub struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) SubmitPhoneCodeRequest(phoneMsg *MsgReq) (*SmsCaptchaResForTencentSub, error) {
|
|
|
|
|
fmt.Sprintln("=============")
|
|
|
|
|
fmt.Println("start send captcha")
|
|
|
|
|
req := &SmsCaptchaReqForTencent{
|
|
|
|
|
Action: "SendSms",
|
|
|
|
|
Version: "2021-01-11",
|
|
|
|
@ -52,19 +50,15 @@ func (c *Client) SubmitPhoneCodeRequest(phoneMsg *MsgReq) (*SmsCaptchaResForTenc
|
|
|
|
|
SignName: "627395",
|
|
|
|
|
TemplateParamSet: []string{phoneMsg.Code, "3"},
|
|
|
|
|
}
|
|
|
|
|
fmt.Println(req)
|
|
|
|
|
body, err := json2.Marshal(req)
|
|
|
|
|
if err != nil {
|
|
|
|
|
fmt.Println(err.Error())
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
fmt.Println(string(body))
|
|
|
|
|
|
|
|
|
|
resp := &SmsCaptchaResForTencent{}
|
|
|
|
|
fmt.Println("gogogo")
|
|
|
|
|
err = c.getParsedResponse("POST", smsSendUrl, jsonHeader, bytes.NewReader(body), resp)
|
|
|
|
|
if err != nil {
|
|
|
|
|
fmt.Println(err.Error())
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if len(resp.SendStatusSet) == 0 {
|
|
|
|
|