f
This commit is contained in:
@@ -54,6 +54,34 @@ func (p *Provider) QueryOrgVerified(ctx context.Context, req *ports.OrgIdentityQ
|
||||
})
|
||||
}
|
||||
|
||||
func (p *Provider) QueryCorpAuthStatus(ctx context.Context, req *ports.CorpAuthStatusQuery) (*ports.CorpAuthStatusResult, error) {
|
||||
_ = ctx
|
||||
if req == nil {
|
||||
return &ports.CorpAuthStatusResult{Supported: true, Found: false}, nil
|
||||
}
|
||||
res, err := p.client.QueryCorpAuth(&sharedfadada.QueryCorpAuthRequest{
|
||||
CorpIdentNo: req.CorpIdentNo,
|
||||
ClientCorpID: req.ClientCorpID,
|
||||
OpenCorpID: req.OpenCorpID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res == nil {
|
||||
return &ports.CorpAuthStatusResult{Supported: true, Found: false}, nil
|
||||
}
|
||||
return &ports.CorpAuthStatusResult{
|
||||
Supported: true,
|
||||
Found: res.Found,
|
||||
Authorized: res.Authorized,
|
||||
Identified: res.Identified,
|
||||
OpenCorpID: res.OpenCorpID,
|
||||
ClientCorpID: res.ClientCorpID,
|
||||
BindingStatus: res.BindingStatus,
|
||||
IdentStatus: res.IdentStatus,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// GenerateContractFile 法大大走签署任务模板(/sign-task/create-with-template),
|
||||
// 此处返回空结果,实际填单由 CreateSignFlow 通过 /sign-task/field/fill-values 完成。
|
||||
func (p *Provider) GenerateContractFile(ctx context.Context, req *ports.ContractGenerateRequest) (*ports.ContractFileResult, error) {
|
||||
@@ -199,10 +227,12 @@ func (p *Provider) ParseCallback(ctx context.Context, headers map[string]string,
|
||||
return nil, err
|
||||
}
|
||||
out := &ports.CallbackEvent{
|
||||
Event: ev.Event,
|
||||
SignFlowID: ev.SignTaskID,
|
||||
AuthFlowID: firstNonEmpty(ev.ClientCorpID, ev.OpenCorpID),
|
||||
Raw: ev.Raw,
|
||||
Event: ev.Event,
|
||||
SignFlowID: ev.SignTaskID,
|
||||
AuthFlowID: firstNonEmpty(ev.ClientCorpID, ev.OpenCorpID),
|
||||
OpenCorpID: ev.OpenCorpID,
|
||||
ClientCorpID: ev.ClientCorpID,
|
||||
Raw: ev.Raw,
|
||||
}
|
||||
if ev.IsSignCompletedCallback() {
|
||||
out.SignCompleted = true
|
||||
|
||||
Reference in New Issue
Block a user