1
This commit is contained in:
@@ -335,12 +335,18 @@ func (a *API) GetMerchantReportStatus(orgCode, agentNo, externalCustomerNo strin
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if imgSupplementResp.Code != "200" {
|
||||
if imgSupplementResp.Code != Success {
|
||||
return nil, fmt.Errorf(imgSupplementResp.Message)
|
||||
}
|
||||
|
||||
base64DecryData, _ := base64.StdEncoding.DecodeString(imgSupplementResp.Data)
|
||||
resultData, err := DecryptByPublicKey(base64DecryData, PublicKeyBegin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
openUnionpayMerchantVo := &OpenUnionpayMerchantVo{}
|
||||
if err = json.Unmarshal([]byte(imgSupplementResp.Data), openUnionpayMerchantVo); err != nil {
|
||||
if err = json.Unmarshal(resultData, openUnionpayMerchantVo); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -612,7 +612,7 @@ type ImgSupplementReq struct {
|
||||
|
||||
// OpenUnionpayMerchantVo 银联报备,商户报备查询
|
||||
type OpenUnionpayMerchantVo struct {
|
||||
AgentNo int `json:"agentNo"` // 机构号
|
||||
AgentNo string `json:"agentNo"` // 机构号
|
||||
OrgCode string `json:"orgCode"` // 代理商编号
|
||||
ExternalCustomerNo string `json:"externalCustomerNo"` // 商户编号
|
||||
CustomerName string `json:"customerName"` // 商户名称
|
||||
|
||||
@@ -227,7 +227,7 @@ func TestCheckImgIsSupplement(t *testing.T) {
|
||||
|
||||
// TestGetMerchantReportStatus 商户报备查询
|
||||
func TestGetMerchantReportStatus(t *testing.T) {
|
||||
api.GetMerchantReportStatus("983931", "24354409", "822651059990E0M")
|
||||
api.GetMerchantReportStatus("983931", "24354409", "822651059990E2S")
|
||||
}
|
||||
|
||||
// TestGetMerchantTerminal 设备终端报备查询
|
||||
|
||||
Reference in New Issue
Block a user