hi, thanks for this great module!,
ok so i updated the module with the latest version to integrate with Ubercart.Everything was setup as per the steps, enabled the new authorize.net in the payment setting for ubercart.
I am using test mode on my staging site..
so i placed an order, enter my cc information..everything goes fine.. the card is successfully charged..
now i check my order and in comments it shows below

08/15/2012
2:55:39 PM 1 Authorize and capture immediately
ACCEPTED: (TESTMODE) This transaction has been approved.
Amount: $4.99
08/15/2012
2:55:41 PM - Order created through website.

so now CIM profile was created..
I try again..so instead of saving my CC info..it again asks me to enter my cc number..
also under user/[uid]/billing i added my CC information..,still its not showing up on checkout pages.

Please let me know if I am missing any steps..

Thanks for your help!

Comments

m.stenta’s picture

Hi there.

So based on your order comments, it looks like the transaction went through via AIM, not CIM. AIM is the fallback in case CIM doesn't work.

Check your Recent Log Entries. Are there any errors reported in there from the authnet_uc module?

omih85’s picture

hi!,here is the log entry i see regarding authnet

Authorize.net AIM Success: Response Code: 1 Response Subcode: 1 Response Reason Code: 1 Response Reason Text: (TESTMODE) This transaction has been approved.
but there is no entry for authnet_uc

I have all the settings enabled for the CIM under authorize.net api

am i missing anything?!

Thanks again!

m.stenta’s picture

Do you have the Devel module installed?

If so, go to /devel/php and enter the following:

$values = array(
  'merchantCustomerId' => 'test',
);
$cim_profile = authnet_customer_profile_new($values);
authnet_cim_profile_save($cim_profile);
dpm($cim_profile->customerProfileId);

That will attempt to create a CIM profile in your Authorize.net account and will print out the profile ID if it was generated successfully. If that works, then it's not an issue with creating CIM profiles. If not, then for some reason it can't create the profile properly in your Authorize.net account. Let me know what happens either way, and we'll figure out next steps.

Also, make sure you have Debug Mode turned ON in the Authorize.net API settings (/admin/settings/authnet), and Drupal's core error reporting setting set to "Write errors to the log and the screen" (/admin/settings/error-reporting). This will ensure that you're seeing every message that the Authorize.net API module is spitting out.

omih85’s picture

hi, the cim was created successfully using devel
Authorize.net CIM Success: Ok Message: Successful. I00001
I have the debug mode on for authorize.net
the error reporting is set to show on screen..but there are no log entries for CIM after I place any order,its still getting authorized via AIM

Thanks!

m.stenta’s picture

Weird.

This might be a tough one to debug without being able to sit down and watch it happen.

Basically, it sounds like something's going wrong between checkout and the charge function (_authnet_uc_charge()). The charge function is what's responsible for determining if a CIM profile is necessary, and if so it creates one. Then at the very bottom of the function, it checks to see if it has a CIM profile and a payment profile, and if so, it charges via CIM. Otherwise, it charges via AIM.

Do you see ANY other log messages during checkout that indicate whether or not a customer profile or payment profile were generated? It could be that one of them is, but the other one isn't. Both need to be, otherwise it will send it via AIM.

If you feel comfortable with code, take a look at that function (_authnet_uc_charge() in authnet/modules/authnet_uc/includes/authnet_uc.charge.inc). It is heavily commented to describe the flow from top to bottom. It's designed to handle a few different scenarios, so it seems pretty complicated. But if you can just put some dpm('test') messages in various places and figure out why the customer profile/payment profile isn't being generated, then that would get us pretty close to figuring this out.

m.stenta’s picture

Also: are you viewing checkout as an anonymous user? Or a logged in user?

You mentioned that you added a credit card via /user/%/billing, and it didn't show up in checkout... were you logged in as that user? If so, and you're not seeing the "existing cards" above the fields for adding a new card, that's really weird... do you see them show up in /user/%/billing?

Also also: There is some tricky code in this module to deal with anonymous checkout, and making sure that the user gets any CIM profiles that are generated before their user account is (because Ubercart will auto-generate users if they don't already have an account). Maybe this is an issue with that, but that would only be if you're checking out anonymously.

omih85’s picture

hi!, yes the c.card shows up on the /billing page, my checkout is set to be secure so user has to login before checkout, so i think we should be good on the user CIM profile mapping.., but for some reason it seems that on the checkout page the its not detecting the saved the CC and updating the billing pane with the option.
I will try to debug the part of code you indicated and see if I can get any results.
I will keep you posted!
thanks again for quick responses!

omih85’s picture

hi!,ok so after some troubleshooting and testing on different staging sites, it seems the issue is related to compatibility with different versions of Ubercart.. the site i was testing on initially had UC 2.7 which didnt show the checkout pane to save the cc and also was not accepting payment using CIM..
then i tested the same module on UC 2.9( latest) and everything working fine.
Iam gona dig in more in this module to see what is causing this in compatibility..

Thanks again...!

m.stenta’s picture

Status: Active » Closed (fixed)

Ok, well that's good to know. I'll mark this issue fixed, and add a note to the project page that it requires Ubercart 2.9+.

Let me know if you figure out exactly what's causing it. If it's an issue with this module, hopefully we can fix it.