create customer profile not checking credit card duplication
zohaib055 opened this issue · 4 comments
Hi creating customer profiles via same code mentioned in sdk
issue is that i can create profiles with same credit card twice in dev mode . There is no checking of duplication can anyone help me out to figure out this issue
Thanks
Hi,
This is the expected behavior of the system.
Let us consider that you are creating two customer profiles C1 and C2 with the same credit card information. You would not get any error for this because Authorize.Net considers C1 and C2 as two distinct customers.
The card information is relevant only for a single customer. If you tried to create two customer payment profiles with the same credit card information for the same customer, you would get an error.
but when i create customer profile it creates payment profile as well with same info
There are three types of API calls that you can make for creation:
For CreateCustomerProfile, you can provide the credit card information and it will create a payment profile as well.
For CreateCustomerPaymentProfile and CreateCustomerShippingAddress, you are creating payment profile and shipping address for an existing customer profile.
If you use CreateCustomerProfile twice with the same credit card information, it will create two customer profiles which translates to two different customers.
I must add that, in this case, the personal information that you provide for the customer (e.g., email) must be unique.
If you provide the exact same data for both requests, the backend will not return you any error but it will return you the pre-existing profiles.
If you want to add a payment profile for the same customer, you can use CreateCustomerPaymentProfile.