cancel
Showing results for 
Search instead for 
Did you mean: 

E00003 invalid merchantAuthentication

Hello, 

I want to pay to some product using my own API, (because wroted SDKs isn't supported for my project type), but I get E00003 and that error shows information about "merchantAuthentication", but that attribute contains that element, and data look's correct.

Example request:

{
      "createTransactionRequest": {
            "transactionRequest": {
                  "transactionType": "authCaptureTransaction",
                  "amount": "90.55",
                  "payment": {
                        "creditCard": {
                              "cardNumber": "4111111111111111",
                              "expirationDate": "2019-02",
                              "cardCode": "111"
                        }
                  }
            },
            "merchantAuthentication": {
                  "name": "5KP3u95bQpv",
                  "transactionKey": "346HZ32z3fP4hTG2"
            }
      }
}

 

And I don't know what that request returns:

{
"messages": {
"resultCode": "Error",
"message": [{
"code": "E00003",
"text": "The element 'createTransactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'transactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'merchantAuthentication' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'."
}
]
}
}

 

 In my opinion that request looks good when I check it with documentation.
Have you any tips for that problem?

I had tried change od expirationDate to format MMYY, and  change merchantAuthentication to my test account, but It's still doesn't work.

 

SajanSSJ4
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Problems:

1. Order of Json properties has metter

2. refId must be sent (even as empty string)

 

Working JSON:
{
"createTransactionRequest": {
"merchantAuthentication": {
"name": "xxxx",
"transactionKey": "xxxxxxx"
},
"refId": "",
"transactionRequest": {
"transactionType": "authOnlyTransaction",
"amount": 140.0,
"payment": {
"creditCard": {
"cardNumber": "4111111111111111",
"expirationDate": "2019-02",
"cardCode": "111"
}
}
}
}
}

View solution in original post

SajanSSJ4
Member
2 REPLIES 2

I find only 2 diffrent with request when I get correct result.

 

1. Request containes "Application Insights" headers likes:

Request-Context: appId=cid-v1:xxxxxx-xxxx-xxxx-xxxx-xxxxx

Request-Id: |xxxxxxx-xxxxx.

x-ms-request-id: |xxxxxxx-xxxxx.

x-ms-request-root-id: xxxxxxx-xxxxx

but I can't remove that from particular request :/

 

2. And serialized model has diffrent order of properties (i change that but still doesn't work)

SajanSSJ4
Member

Problems:

1. Order of Json properties has metter

2. refId must be sent (even as empty string)

 

Working JSON:
{
"createTransactionRequest": {
"merchantAuthentication": {
"name": "xxxx",
"transactionKey": "xxxxxxx"
},
"refId": "",
"transactionRequest": {
"transactionType": "authOnlyTransaction",
"amount": 140.0,
"payment": {
"creditCard": {
"cardNumber": "4111111111111111",
"expirationDate": "2019-02",
"cardCode": "111"
}
}
}
}
}

SajanSSJ4
Member