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.
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.
Solved! Go to Solution.
03-24-2015 12:22 AM
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
03-24-2015 05:21 PM
03-24-2015 05:21 PM
Thanks for the prompt response RichardH
03-31-2015 07:47 AM