cancel
Showing results for 
Search instead for 
Did you mean: 

Error in creating customer Profile with multiple payment profiles(CIM)


Hi All,


How to create customer Profile with multiple payment profiles(CIM)?


Creating customer profile with single payment profile is working fine. But when i try to add two or more payment profile to a customer profile , i am getting the below error.

E00003 - The element 'paymentProfiles' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'customerType' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'driversLicense, taxId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.<br>

Here is my xml request:
<?xml version="1.0" encoding="UTF-8"?>
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
   <merchantAuthentication>
      <name>33k7hYV736488Bs8</name>
      <transactionKey>86SV776773Ac6tMV22313fE</transactionKey>
   </merchantAuthentication>
   <refId>1361101257555</refId>
   <profile>
      <merchantCustomerId>2CLINC056</merchantCustomerId>
      <description>hiiiiii.</description>
      <email />
      <paymentProfiles>
         <customerType>individual</customerType>
         <billTo>
            <firstName>Joe</firstName>
            <lastName>Test</lastName>
            <company>CompanyA</company>
            <address>hello</address>
            <city>Bangalore</city>
            <state>Delhi</state>
            <zip>560078</zip>
            <country>IN</country>
            <phoneNumber>415-555-1212</phoneNumber>
            <faxNumber>415-555-1313</faxNumber>
         </billTo>
         <payment>
            <creditCard>
               <cardNumber>370000000000002</cardNumber>
               <expirationDate>2029-12</expirationDate>
            </creditCard>
         </payment>
         <customerType>individual</customerType>
         <billTo>
            <firstName>Joe</firstName>
            <lastName>Test</lastName>
            <company>CompanyA</company>
            <address>vel</address>
            <city>Chennai</city>
            <state>AK</state>
            <zip>560089</zip>
            <country>US</country>
            <phoneNumber>415-555-1212</phoneNumber>
            <faxNumber>415-555-1313</faxNumber>
         </billTo>
         <payment>
            <creditCard>
               <cardNumber>38000000000006</cardNumber>
               <expirationDate>2029-12</expirationDate>
            </creditCard>
         </payment>
      </paymentProfiles>
   </profile>
   <validationMode>testMode</validationMode>
</createCustomerProfileRequest>


Please help on this.

Regards,
Vel.

velmurugan
Member
4 REPLIES 4

<?xml version="1.0" encoding="UTF-8"?>
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
   <merchantAuthentication>
      <name>33k7hYV736488Bs8</name>
      <transactionKey>86SV776773Ac6tMV22313fE</transacti

onKey>
   </merchantAuthentication>
   <refId>1361101257555</refId>
   <profile>
      <merchantCustomerId>2CLINC056</merchantCustomerId>
      <description>hiiiiii.</description>
      <email />
      <paymentProfiles>
         <customerType>individual</customerType>
         <billTo>
            <firstName>Joe</firstName>
            <lastName>Test</lastName>
            <company>CompanyA</company>
            <address>hello</address>
            <city>Bangalore</city>
            <state>Delhi</state>
            <zip>560078</zip>
            <country>IN</country>
            <phoneNumber>415-555-1212</phoneNumber>
            <faxNumber>415-555-1313</faxNumber>
         </billTo>
         <payment>
            <creditCard>
               <cardNumber>370000000000002</cardNumber>
               <expirationDate>2029-12</expirationDate>
            </creditCard>
         </payment>

</paymentProfiles>

<paymentProfiles>
         <customerType>individual</customerType>
         <billTo>
            <firstName>Joe</firstName>
            <lastName>Test</lastName>
            <company>CompanyA</company>
            <address>vel</address>
            <city>Chennai</city>
            <state>AK</state>
            <zip>560089</zip>
            <country>US</country>
            <phoneNumber>415-555-1212</phoneNumber>
            <faxNumber>415-555-1313</faxNumber>
         </billTo>
         <payment>
            <creditCard>
               <cardNumber>38000000000006</cardNumber>
               <expirationDate>2029-12</expirationDate>
            </creditCard>
         </payment>
      </paymentProfiles>
   </profile>
   <validationMode>testMode</validationMode>
</createCustomerProfileRequest>

RaynorC1emen7
Expert

thanks for your reply.

 

The XML is generated by SDK.

 

for (1 to n){

list.add (createPaymentProfile());

}

.

.

Transaction.setPaymentProfileList(list);

 

The above code generates XML like that.

I think SDK has some problem in creating multiple payment profiles for a customer especially(CIM).

Look that way.

My outgoing xml has the closure and new opener for paymentProfiles as you show, but I'm getting the same error back: (this is using the data from the test suite that comes with the github api)

<?xml version="1.0" encoding="utf-8"?>
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>------------</name>
<transactionKey>---------------</transactionKey>
</merchantAuthentication>
<profile>
<paymentProfiles>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>2015-10</expirationDate>
</creditCard>
</payment>
<customerType>individual</customerType>
</paymentProfiles>
<paymentProfiles>
<payment>
<bankAccount>
<accountType>businessChecking</accountType>
<routingNumber>121042882</routingNumber>
<accountNumber>123456789123</accountNumber>
<nameOnAccount>Jane Doe</nameOnAccount>
<echeckType>WEB</echeckType>
<bankName>Pandora Bank</bankName>
</bankAccount>
</payment>
<customerType>business</customerType>
</paymentProfiles>
<shipToList>
<phoneNumber>555-555-5555</phoneNumber>
<faxNumber>555-555-5556</faxNumber>
<firstName>john</firstName>
<lastName>Doe</lastName>
<company>John Doe Company</company>
<address>1 Main Street</address>
<city>Boston</city>
<state>MA</state>
<zip>02412</zip>
<country>USA</country>
</shipToList>
<shipToList>
<phoneNumber>555-512-5555</phoneNumber>
<faxNumber>555-523-5556</faxNumber>
<firstName>jane</firstName>
<lastName>Doe</lastName>
<address>11 Main Street</address>
<city>Boston</city>
<state>MA</state>
<zip>02412</zip>
<country>USA</country>
</shipToList>
<merchantCustomerId>148097225310</merchantCustomerId>
<description>Description of customer</description>
<email>blahbla@domain.com</email>
</profile>
<validationMode>liveMode</validationMode>
</createCustomerProfileRequest>