Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 2
Registered: ‎03-23-2015
Accepted Solution

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.

 


Accepted Solutions
Solution
Accepted by topic author gbrandy1
‎08-21-2015 01:58 AM
Posts: 2,765
Topics: 57
Kudos: 270
Blog Posts: 67
Registered: ‎12-05-2011

Re: Is customerPaymentProfileId unique identifier

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


All Replies
Solution
Accepted by topic author gbrandy1
‎08-21-2015 01:58 AM
Posts: 2,765
Topics: 57
Kudos: 270
Blog Posts: 67
Registered: ‎12-05-2011

Re: Is customerPaymentProfileId unique identifier

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

Highlighted
Member
Posts: 2
Registered: ‎03-23-2015

Re: Is customerPaymentProfileId unique identifier

Thanks for the prompt response RichardH