修改
This commit is contained in:
parent
2a67325bfc
commit
23e50b24fc
@ -26,4 +26,6 @@ https://cdns.fontree.cn/fonchain-main/test/image/0/chain-dci/file/b2b9ebf8-5e8a-
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
protoc --proto_path=. --proto_path=D:/go_workspace/src --go_out=./pb --govalidators_out=./pb --go-triple_out=./pb ./pb/dci.proto
|
protoc --proto_path=. --proto_path=D:/go_workspace/src --go_out=./pb --govalidators_out=./pb --go-triple_out=./pb ./pb/dci.proto
|
||||||
|
|
||||||
|
protoc --proto_path=. --go-grpc_out=./pb --proto_path=D:/go_workspace/src --go_out=./pb --govalidators_out=./pb --go-triple_out=./pb ./pb/dci.proto
|
||||||
```
|
```
|
@ -109,31 +109,14 @@ func (r *DciRegistration) GetDciPayUrl(req *dci.GetDciPayUrlRequest) (res *dci.G
|
|||||||
amount = strings.TrimSpace(e.Text)
|
amount = strings.TrimSpace(e.Text)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
err = c.Visit(res.PayUrl)
|
||||||
|
if err != nil {
|
||||||
|
errCommon.NoReturnInfo(getDciPayUrlResponse, "数登支付金额获取 失败: ")
|
||||||
|
}
|
||||||
|
|
||||||
res.Amount = amount
|
res.Amount = amount
|
||||||
|
|
||||||
return
|
fmt.Printf("res : %+v\n", res)
|
||||||
}
|
|
||||||
|
|
||||||
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 {
|
|
||||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
|
||||||
}
|
|
||||||
getDciPayUrlRequest.SetClientToken(clientToken)
|
|
||||||
|
|
||||||
getDciPayUrlResponse, err := app.ModuleClients.BccrClient.GetDciPayurl(getDciPayUrlRequest)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errCommon.ReturnError(err, msg.ErrGetDciPayurl, "数登支付链接获取 失败: ")
|
|
||||||
}
|
|
||||||
|
|
||||||
errCommon.NoReturnInfo(getDciPayUrlResponse, "数登支付链接获取 成功: ")
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user