diff --git a/README.md b/README.md index ec87d2f..ecf8289 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,6 @@ https://cdns.fontree.cn/fonchain-main/test/image/0/chain-dci/file/b2b9ebf8-5e8a- ```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=. --go-grpc_out=./pb --proto_path=D:/go_workspace/src --go_out=./pb --govalidators_out=./pb --go-triple_out=./pb ./pb/dci.proto ``` \ No newline at end of file diff --git a/internal/logic/dci_registration.go b/internal/logic/dci_registration.go index b43705c..e681da7 100644 --- a/internal/logic/dci_registration.go +++ b/internal/logic/dci_registration.go @@ -109,31 +109,14 @@ func (r *DciRegistration) GetDciPayUrl(req *dci.GetDciPayUrlRequest) (res *dci.G amount = strings.TrimSpace(e.Text) }) - res.Amount = amount - - 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()) + err = c.Visit(res.PayUrl) if err != nil { - return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ") + errCommon.NoReturnInfo(getDciPayUrlResponse, "数登支付金额获取 失败: ") } - getDciPayUrlRequest.SetClientToken(clientToken) - getDciPayUrlResponse, err := app.ModuleClients.BccrClient.GetDciPayurl(getDciPayUrlRequest) - if err != nil { - return nil, errCommon.ReturnError(err, msg.ErrGetDciPayurl, "数登支付链接获取 失败: ") - } + res.Amount = amount - errCommon.NoReturnInfo(getDciPayUrlResponse, "数登支付链接获取 成功: ") + fmt.Printf("res : %+v\n", res) return }