cancel
Showing results for 
Search instead for 
Did you mean: 

CIM Issues and Guide Lines

Hello, all. 

I've started using authorize.net SDK java since may last year, with AIM. In the last couple months I've been using CIM and it seems ok EXCEPT for a spectific bug that happens from time to time when someone enters a creditcard that is not authorized by the credit card bank for some reason (no balance, invalid zip code or other things)..

 

The bug in itself is simple:

 1 - My application requests the creation of a profile with valid credit card data. CIM Profile and Payment Profile is created and identifiers (ProfileId and PaymentProfileId) returned. 

2  - A request to authorize and capture using profile and payment profile Id created in step 1 is made.  Creditcard is denied. 

 

Steps 1 and 2 are executed in my application inside a database transaction, and because it failed, no data was recorded.  

The application redirects back to the checkout page and display the error message to the user.

The user then, enters a new credit card and authorize.net invalidates the transaction right at step 1, because the Profile already exists at CIM. 

 

So my question seems to be more like: What am I doing wrong?  I can surely remove the creation of the CIM profile in step 1  outside the database transaction and always try step 2 passing the apropriate Payment and Profile Ids.

 

Although I honestly don't want to even try to save the user information at CIM if the creditcard has no funds at first place! Would it be OK to do an authorization of the creditcard first using AIM and only then I execute steps 1 and 2? Or is this what I am supposed to do at first place? 

 

It seems to me that this is not na unsual problem and someone might have ran into it before. Maybe there is a guide line doc for this kind information ?

 

Thanks in advance

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

If you get a duplicate profile error, it should also return the profile ID of the duplicate profile, allowing you to move on as if the profile has been freshly created. Should be CIM error code E00039, just check for that and then check for a profile ID.

View solution in original post

TJPride
Expert

Regarding payment profiles, you could probably reduce the confusion there by switching to the hosted popup and then when the customer is done doing any necessary additions / updates, just displaying a pulldown of the payment options (last 4 digits) and letting him choose which one to pay with. Doing it the way you're doing (matching last 4 digits) should work find, however - is this being tested on a developer account or a production account? The developer server is sometimes overloaded, I would guess especially on weekends, so you will probably get significantly faster response times on production.

View solution in original post

4 REPLIES 4

If you get a duplicate profile error, it should also return the profile ID of the duplicate profile, allowing you to move on as if the profile has been freshly created. Should be CIM error code E00039, just check for that and then check for a profile ID.

TJPride
Expert

It works when trying to create a duplicated  profile, thanks.

 

However when trying to create a duplicated payment profile, the response doesn't return me any payment profile Id.

 

I have to request a fetch in the profile and iterate through the payment profiles till I find a matching credit card 

and then submit an update. 

 

It seems like if the user hast two credit cards that ends with the same last numbers I might be updating the wrong one and possibily getting more errors. How the site evaluates if a payment profile is duplicated ? By the credit card number ? Because , correcly, I don't receive that. So I should match with something else than the last four digits right ? 

 

Secondly, it is a very slow process. My unit test takes about 20s to do this round trip. How scalable is that ? 

Regarding payment profiles, you could probably reduce the confusion there by switching to the hosted popup and then when the customer is done doing any necessary additions / updates, just displaying a pulldown of the payment options (last 4 digits) and letting him choose which one to pay with. Doing it the way you're doing (matching last 4 digits) should work find, however - is this being tested on a developer account or a production account? The developer server is sometimes overloaded, I would guess especially on weekends, so you will probably get significantly faster response times on production.

I have production and development accounts. My unit tests run agains the development box. 

 

I've found a way that is much simpler: I use AIM every time the user enters a new creditcard. If is authorized and captured I then continue the creation of the Proile and Payment Profile with the information that I already have in hand. 

 

Of course, if the user already have CIM profile and wants to use a previous credit card, then he will select the options (a list of radio buttons listed with the last four numbers of the cc and its type) in that case I'll just use the CIM api to pay.

 

It is all good now. Took me that whole morning yesterday to build something that is stable enough against the API. I think it will be alright . 

 

Thanks for the help.