cancel
Showing results for 
Search instead for 
Did you mean: 

CIM createCustomerPaymentProfile error

I am using your PHP SDK (latest version) with class: AuthorizeNetCIN.
I am receiving the error when I call function: createCustomerPaymentProfile  with activated: validationMode = ‘testMode’.  Error:
Error: Error Message: The element 'createCustomerPaymentProfileRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'validationMode' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'refId, customerProfileId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. E00003
If I use ‘none’ for validation, the profile will be added successfully. Please take a look at our last request. Or, please tell us how to get generated XML request from your library.

savinovalex
Member
4 REPLIES 4

Hey savinovalex,

 

This is a known bug that will be fixed with the next release. 

 

To work around this issue in the meantime, you can perform the following modifications to the SDK code:

 

In lib/AuthorizeNetCIM.php:

Remove line 368 from the _constructXml method:
($this->_validationMode != "none" ? $this->_xml->addChild('validationMode',$this->_validationMode) : "");

Add this line at line # 346, the first line of the _setPostString() method:

($this->_validationMode != "none" ? $this->_xml->addChild('validationMode',$this->_validationMode) : "");

 

Hopefully that will help.

 

Thanks,

 

Michelle

Developer Community Manager

Michelle
All Star

How about a workaround for us ASPX/C# users?

The error mentioned here is specific to the PHP SDK. Are you saying that you are receiving something similar using the C# SDK?

 

I have same error in ios sdk.

 

 

indies
Member