1
This commit is contained in:
@@ -151,7 +151,7 @@ func (a *API) RefundOrderQuery(param *RefundOrderQueryReq) ([]*RefundOrderQueryR
|
||||
}
|
||||
|
||||
// ApplyElectronicContract 电子合同签约
|
||||
func (a *API) ApplyElectronicContract(param *ApplyContractParam) (*ApplyContractResp, error) {
|
||||
func (a *API) ApplyElectronicContract(param *ApplyContractParam) (*ApplyContract, error) {
|
||||
reqParameter := map[string]interface{}{
|
||||
"req_data": utils.Struct2Map(param, "", false),
|
||||
"version": Version3,
|
||||
@@ -162,16 +162,12 @@ func (a *API) ApplyElectronicContract(param *ApplyContractParam) (*ApplyContract
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result["code"].(string) != Success {
|
||||
return nil, fmt.Errorf(result["msg"].(string))
|
||||
}
|
||||
|
||||
bodyResult, err := json.Marshal(result["resp_data"].(map[string]interface{}))
|
||||
bodyResult, err := json.Marshal(result)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp := &ApplyContractResp{}
|
||||
resp := &ApplyContract{}
|
||||
if err = json.Unmarshal(bodyResult, resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user