This question has been flagged
2963 Views

>>> import json

>>> import requests

data={
...     "authenticateTestRequest": {
...             "merchantAuthentication": {
...                     "name": "##########",
...                     "transactionKey": "###########"
...             }
...     }
... }
>>> r=requests.post('https://apitest.authorize.net/xml/v1/request.api',json=data)
>>> r.text
'\ufeff{"messages":{"resultCode":"Error","message":[{"code":"E00003","text":"The element \'merchantAuthentication\' in namespace \'AnetApi/xml/v1/schema/AnetApiSchema.xsd\' has invalid child element \'name\' in namespace \'AnetApi/xml/v1/schema/AnetApiSchema.xsd\'. List of possible elements expected: \'mobileDeviceId\' in namespace \'AnetApi/xml/v1/schema/AnetApiSchema.xsd\'."}]}}'

Avatar
Discard