cancel
Showing results for 
Search instead for 
Did you mean: 

CIM createCustomerPaymentProfileRequest duplicate entries problem

Accoring to the CIM guide at http://www.authorize.net/support/CIM_XML_guide.pdf PAGE 105 under "Duplicate Profile Verification",  when adding a new payment profile using "createCustomerPaymentProfileRequest", if the payment profile information is the same as a payment profile already in the customer profile, "then the payment gateway will return an error that contains the ID of the already-created profile." As far as I've been able to test, it does not work like the documentation states at all. All I receive back is "Error E00039 A duplicate customer payment profile already exists.", but I do not receive the crucial payment ID of the existing matching profile.

 

I absolutely need to get this existing payment id returned as there is no other way for me to compare newly entered CC info to a customer's existing profile because all CC info is masked out. (Customers do not [yet] store profiles in my system, but on certain recurring delivery orders, I first bill using AIM for the 1st transaction, then store their info in a CIM profile for subsequent transactions. If a customer returns and starts another recurring delivery order, they enter their CC info again, it will be billed via AIM, then go to CIM. If the payment already exists, I want to use the existing payment ID. If not, create a new payment profile.)

 

Augie

augie
Member
26 REPLIES 26

This seems like a gaping hole in the CIM implementation that still exists 4 years later.

 

Seems like a fairly common usage pattern to allow Customers to use existing saved cards or enter new card details.

With the current CIM implementation if the Customer enters a new card that happens to already exist we as developers are out of luck.

Seems to be there is no 100% guaranteed way to find the existing payment profile other than looping through them and comparing the last 4 of the card number and hoping it isnt' likely they have two cards with same last 4.

Is there a way to file an official bug request with the development team?

 

 

What a shame for authorize.net.

4 years and no update ?

 

B"H

 

As of now, it seems the API currently DOES return the Payment Profile ID. 

See below:

<?xml version="1.0" encoding="utf-8"?>
<createCustomerPaymentProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
   <messages>
      <resultCode>Error</resultCode>
      <message>
         <code>E00039</code>
         <text>A duplicate customer payment profile already exists.</text>
      </message>
   </messages>
   <customerProfileId>36723225</customerProfileId>
   <customerPaymentProfileId>34783893</customerPaymentProfileId>
</createCustomerPaymentProfileResponse>

 

ycadaner770
Member

There is no profile ID in my response. Is it because I use sandbox?

 

<?xml version="1.0" encoding="utf-8"?>
<createCustomerProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>Error</resultCode>
<message><code>E00039</code>
<text>A duplicate record with ID 40093076 already exists.</text>
</message>
</messages>
<customerPaymentProfileIdList />
<customerShippingAddressIdList />
<validationDirectResponseList />
</createCustomerProfileResponse>

This is rediculous! Why have a sandbox if it doesn't work? Zero support and they claim to have award winning customer service. I followed the examples and all I get is this in the sandbox:

 

{
"customerProfileId": null,
"customerPaymentProfileIdList": [],
"customerShippingAddressIdList": [],
"validationDirectResponseList": [],
"refId": null,
"messages": {
"resultCode": 1,
"message": [
{
"code": "E00039",
"text": "A duplicate record already exists.",
"PropertyChanged": null
}
],
"PropertyChanged": null
},
"sessionToken": null,
"PropertyChanged": null
}

devlead123
Member

Okay, I figured out that the home address and customer office address cannot be the same or you'll get the: 

 

"code": "E00039",
"text": "A duplicate record already exists.",

 

I guess Authorize.Net doesn't take into account that some people have a home office?

 

List<customerAddressType> addressInfoList = new List<customerAddressType>();
customerAddressType homeAddress = new customerAddressType();
homeAddress.address = address;
homeAddress.city = city;
homeAddress.zip = zip;


customerAddressType officeAddress = new customerAddressType();
officeAddress.address = address;
officeAddress.city = city;
officeAddress.zip = " zip;

It does look like Authorize.net passes back the duplicate profile id, but it embedded in text. You can parse it using PHP.

php > $string = "A duplicate record with ID 40093076 already exists.";
php > preg_match_all('!\d+!', $string2, $matches);
php > print_r($matches[0][0]);

40093076