Reply
Highlighted
Member
Posts: 1
Registered: ‎09-04-2013
Accepted Solution

CIM createCustomerPaymentProfile

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

 

 


Accepted Solutions
Highlighted
Solution
Accepted by topic author ed704
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: CIM createCustomerPaymentProfile

follow the xml documentation sample. sequence matter for the xml.

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author ed704
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: CIM createCustomerPaymentProfile

follow the xml documentation sample. sequence matter for the xml.

Highlighted
Member
Posts: 1
Registered: ‎01-03-2020

Re: CIM createCustomerPaymentProfile

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.

Highlighted
Moderator
Posts: 102
Registered: ‎06-26-2018

Re: CIM createCustomerPaymentProfile

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