I am using CIM - XML - PHP
I can create a customerPaymentProfile successfully unil I can any of the following to <billTo>:
address, city, state, zip, country, then I get the error:
[E00003] The element 'billTo' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'address' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'faxNumber' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
I don't understand how address, etc are invalid. The sample code did not use these. Am I missing something?
Thank you
Solved! Go to Solution.
09-04-2013 05:13 PM
follow the xml documentation sample. sequence matter for the xml.
09-04-2013 06:04 PM
follow the xml documentation sample. sequence matter for the xml.
09-04-2013 06:04 PM
We are using the JSON API and facing the same problem. I'm sure that JSON doesn't enforce any order for the elements.
This works
{ "createCustomerProfileRequest": { "merchantAuthentication": { "name": "5KP3u95bQpv", "transactionKey": "346HZ32z3fP4hTG2" }, "profile": { "merchantCustomerId": "432652", "description": "Profile description here", "email": "customer-profile-email@here.com", "paymentProfiles": { "customerType": "individual", "billTo": { "firstName": "John", "lastName": "Doe", "address": "123 Main St.", "city": "Bellevue", "state": "WA", "zip": "98004", "country": "USA", "phoneNumber": "000-000-0000" }, "payment": { "creditCard": { "cardNumber": "4111111111111111", "expirationDate": "2020-12" } } } }, "validationMode": "testMode" } }
Whereas, this doesn't work.
{ "createCustomerProfileRequest": { "merchantAuthentication": { "name": "5KP3u95bQpv", "transactionKey": "346HZ32z3fP4hTG2" }, "profile": { "merchantCustomerId": "432652", "description": "Profile description here", "email": "customer-profile-email@here.com", "paymentProfiles": { "customerType": "individual", "payment": { "creditCard": { "cardNumber": "4111111111111111", "expirationDate": "2020-12" } }, "billTo": { "firstName": "John", "lastName": "Doe", "address": "123 Main St.", "city": "Bellevue", "state": "WA", "zip": "98004", "country": "USA", "phoneNumber": "000-000-0000" } } }, "validationMode": "testMode" } }
Please help.
01-03-2020 02:59 AM
Hi aneel11986,
The Authorize.Net JSON is not RESTful and is converted to XML once received, thus the order is defined and requests must be submitted in the defined order documented in the API Reference Guide and schema.
Regards,
Elaine
01-03-2020 09:18 AM