Compare commits

...

2 Commits

Author SHA1 Message Date
jhc 242d682999 Merge branch 'dev' of http://192.168.12.3:3000/chain/chain-dci into dev
continuous-integration/drone/push Build is passing Details
6 months ago
jhc 23e50b24fc 修改 6 months ago

@ -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
```

@ -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
}

Loading…
Cancel
Save