cancel
Showing results for 
Search instead for 
Did you mean: 

Is customerPaymentProfileId unique identifier

Scoured the CIM docs, API code, and sent support email but cannot get a definitive statement whether customerPaymentProfileId is a unique identifier. I know that customerProfileId is unique and see that all API calls concerning payment profiles require customerProfileId AND customerPaymentProfileId. This makes me think that customerPaymentProfileId is not unique.

 

The reason I need a definitive answer is that I am using a third party module which I think is flawed. This module stores the customerPaymentProfileId and customerProfileId in MySQL as a non unique fields having another field provide serial unique ID (pid). It saves the customerPaymentProfileId to a subscription order and later, when processing the next payment, queries the database using just the customerPaymentProfileId to fetch the customerProfileId. I think this could possible cause a wrong person to be charged.

 

TABLE STRUCTURE: (reduced for brevity)

Name                                        Type                  Attrib           Extra

--------                                         -------                 --------          --------

pid                                              int(10)              unsigned   auto_increment

customerPaymentProfileId    varchar(11)

customerProfileId                    varchar(11)

 

INDEXES: (as is)

Keyname                                   Type           Unique       Column

-------------                                   -------           ----------       -----------

primary                                       btree          yes             pid

customerPaymentProfileId     btree          no               customerPaymentProfileId

customerProfileId                     btree          no               customerProfileId

 

IMHO this is all wrong.

 

  • customerProfileId and customerPaymentProfileId must be saved to order for subsequent queries.
  • customerPaymentProfileId & customerProfileId should be int(10) unsigned.
  • customerPaymentProfileId & customerProfileId should be unique index.

If customerPaymentProfileId is not unique then it will require extensive recoding of the module with retrocative fixes to ensure data integrity and possible refunds. Appreciate all input but ideally want a definitive answer from Auth.net staff that customerPaymentProfileId is not unique so that I can force module recode.

 

gbrandy1
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Hello @gbrandy1 

 

I can confirm that the code should work today because the payment profile IDs are currently unique. however we would recommend updating the code because they are not guaranteed to remain unique in the future.

 

Richard

View solution in original post

RichardH
Administrator Administrator
Administrator
2 REPLIES 2

Hello @gbrandy1 

 

I can confirm that the code should work today because the payment profile IDs are currently unique. however we would recommend updating the code because they are not guaranteed to remain unique in the future.

 

Richard

RichardH
Administrator Administrator
Administrator

Thanks for the prompt response RichardH