cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

What is the correct flow of using CIM for receiving CC payments and maintaining the payment profiles

I have a site in PHP with AIM integration , which is workign fine. 

Now i need ot integrate CIM , in order to allow my users to select their exisitng Payment profile Or tocreate new payment profile. 

 

My site  has login feature, which creates the session  with userId and the emailAddress. I am using these 2 parameters to fetch the  Shipping and Payment profile of the logged in user.  I am properly gettign the list of my  shipping and  Payment profiles.  in addition to the existing profiles, I am allowing the user to enter  a new card info to create a new Payment profile, if he wants to. 

 

When I submit this info to my  backend script ,  it attempts to do the following : 

-Attempts to create a user Profile.  if the profile is created successfully, it gives the customerProfileId.  If the profile already exists with the same email and customerId , it  sends the "duplicate error ...." , which i am parsing and getting the customerProfileId. 
So, I have the costomerProfileId , in any case.

 

Now, I attempt to create the  customerPaymentProfile. If this is successfully created, then it will return the customerPaymentProfileId , which i can use to create the payment transaction, But what if the profile is duplicate  ?  As paymentProfile creation doesn't return the Id of duplicate profile.  I can't use the existing profile Id. 

What is the best solution for this?

 

Also I am a bit puzzelled in the steps :

Should i create the Profile first and then proceed with the payment using that profile ? 
OR  Attempt to process payment first ( using AIM ?) and if payment is successful  then create the profile? 

Not sure if i shoudl ise  AIM and CIM both, or just CIM.

 

Please advice. Thanks

digitech
Member
1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3

Now, I attempt to create the  customerPaymentProfile. If this is successfully created, then it will return the customerPaymentProfileId , which i can use to create the payment transaction, But what if the profile is duplicate  ?  As paymentProfile creation doesn't return the Id of duplicate profile.  I can't use the existing profile Id. 

What is the best solution for this?

 

get the list of their payment profile and compare the last 4 digit. Do it from the latest one first(highest payment profile ID) to use the latest expiration date.

 

Also I am a bit puzzelled in the steps :

Should i create the Profile first and then proceed with the payment using that profile ? 
OR  Attempt to process payment first ( using AIM ?) and if payment is successful  then create the profile? 

Not sure if i shoudl ise  AIM and CIM both, or just CIM.

Just use CIM.

RaynorC1emen7
Expert

Same is the situation with the  duplicate shipping profiles.

 

If i loop though the exiting Payment Profiles and the Shipping profiles , what are the key fields to match  for these profiles.

 

For the Payment Profiles : 
Last four digits of the creditCard->cardNumber 

 

For the Shipping Profiles , Should i match all fields ?
profile->shipToList->firstName
profile->shipToList->lastName
profile->shipToList->address
profile->shipToList->city
profile->shipToList->state
profile->shipToList->zip
profile->shipToList->country
profile->shipToList->phoneNumber

 

What is the best way?

In the doc

http://www.authorize.net/support/CIM_SOAP_guide.pdf

under "Duplicate Profile Verification"