|
|
@ -109,31 +109,14 @@ func (r *DciRegistration) GetDciPayUrl(req *dci.GetDciPayUrlRequest) (res *dci.G
|
|
|
|
amount = strings.TrimSpace(e.Text)
|
|
|
|
amount = strings.TrimSpace(e.Text)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
res.Amount = amount
|
|
|
|
err = c.Visit(res.PayUrl)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (r *DciRegistration) GetDciPayAmount(req *dci.GetDciPayUrlRequest) (res *dci.GetDciPayUrlResponse, err error) {
|
|
|
|
|
|
|
|
errCommon.NoReturnInfo(req, "数登支付链接获取 参数信息: ")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = new(dci.GetDciPayUrlResponse)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getDciPayUrlRequest := new(bccrClient.GetDciPayurlRequest)
|
|
|
|
|
|
|
|
_ = copier.CopyWithOption(&getDciPayUrlRequest, req, copier.Option{DeepCopy: false})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clientToken, err := createToken(time.Now().UnixMilli(), req.DigitalRegisterId, app.ModuleClients.SfNode.Generate().Base64())
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
|
|
|
errCommon.NoReturnInfo(getDciPayUrlResponse, "数登支付金额获取 失败: ")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
getDciPayUrlRequest.SetClientToken(clientToken)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getDciPayUrlResponse, err := app.ModuleClients.BccrClient.GetDciPayurl(getDciPayUrlRequest)
|
|
|
|
res.Amount = amount
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, errCommon.ReturnError(err, msg.ErrGetDciPayurl, "数登支付链接获取 失败: ")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
errCommon.NoReturnInfo(getDciPayUrlResponse, "数登支付链接获取 成功: ")
|
|
|
|
fmt.Printf("res : %+v\n", res)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|