Reply
Member
Posts: 2
Registered: ‎01-04-2012

CIM XML API updateCustomerProfileRequest FAILED

I'm using the CIM XML interface.
 
I called createCustomerProfileRequest with the following and it worked fine. 
 
<?xml version='1.0' encoding='utf-8'?><createCustomerProfileRequest xmlns='AnetApi/xml/v1/schema/AnetApiSchema.xsd'><merchantAuthentication><name>6aPcZWV848</name><transactionKey>6h8Dfx82zJ6R48SN</transactionKey></merchantAuthentication><profile> <merchantCustomerId>12345</merchantCustomerId> <description>Bill Wood</description> <email>bob@pinnaclep.com</email> <paymentProfiles><payment> <creditCard> <cardNumber>5443426150046283</cardNumber> <expirationDate>2013-09</expirationDate> </creditCard></payment> </paymentProfiles></profile><validationMode>testMode</validationMode></createCustomerProfileRequest>
 
BUT, when I called updateCustomerProfileRequest with the following and it failed. 
 
<?xml version='1.0' encoding='utf-8'?><updateCustomerProfileRequest xmlns='AnetApi/xml/v1/schema/AnetApiSchema.xsd'><merchantAuthentication><name>6aPcZWV848</name><transactionKey>6h8Dfx82zJ6R48SN</transactionKey></merchantAuthentication><profile> <customerProfileId>28539399</customerProfileId> <merchantCustomerId>12345</merchantCustomerId> <description>Bob Wood1</description> <email>bob@pinnaclep.com</email></profile></updateCustomerProfileRequest>
 
ERROR Code: E00003
ERROR Message:
The element 'profile' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'merchantCustomerId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'
 
Posts: 1,476
Topics: 33
Kudos: 34
Solutions: 126
Registered: ‎09-14-2009

Re: CIM XML API updateCustomerProfileRequest FAILED

[ Edited ]

Try changing the order around of the child elements of <profile>. Order does matter:

 

<?xml version="1.0"?>
<updateCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>523452345523</name>
    <transactionKey>234523452345234545</transactionKey>
  </merchantAuthentication>
  <profile>
    <merchantCustomerId>12345</merchantCustomerId>
    <description>Bob Wood1</description>
    <email>bob@pinnaclep.com</email>
    <customerProfileId>28539399</customerProfileId>
  </profile>
</updateCustomerProfileRequest>

 


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post
Member
Posts: 2
Registered: ‎01-04-2012

Re: CIM XML API updateCustomerProfileRequest FAILED

Thx, that did it.  It wanted the customerProfileId element last within the profile element. Funny!