Downloads

UPDATE: This module is not currently compatible with Ubercart 1.6. It has been well tested and is compatible with Ubercart 1.4.

This module enables advanced functionality for the Authorize.net payment gateway,
based on their Customer Information Manager (CIM) system. With it you can store
your customer's credit card information on Authorize.net's servers. This makes
several important features possible, without exposing a store owner to the
security risk of storing credit #'s in their database.

You'll like this module if you want to:

Help your repeat customers checkout more quickly by entering their credit card info only once.

Accept pre-orders for a product and charge the customer when you ship it.

Process recurring payments using the uc_recurring module.

Process refunds from within Ubercart.

Please see the included README file for installation notes, use notes, and an API example.

Your help testing and providing feedback is greatly appreciated.

Change Log:
V0.3
-Added ability for customers to edit their credit card info from the checkout screen
-Added a seperate database table for developer account test mode so that profile id's do
not get mixed between the two accounts.
-Added an CIM-specific order pane ("Credit Card Payment")
-Integrated support for pre-orders, based on inventory level set by the uc_stock module.
-Customers can now edit their credit card info and delete stored profiles.
-Integrated with uc_recurring module.

v0.8
-Fixed recurring fee handler bug (would fail for purchases not made with the special CIM pane)
-Fixed bug that could let some transactions look like they succeeded, when they actually failed.
-Added a "test mode" for non-developers. It is still only moderately useful due to CIM limitations.

v0.83
-Changed split to explode for reading delimiting characters.
-Added more watchdog logging to help with debugging

v0.90
-Fix incompatibilities with Ubercart 1.4 due to the revision of the uc_recurring module

Thanks for pointing that out, I thought I'd rolled that $transaction_type change back. It was an attempt to put together a better test mode, but didn't work out. Let me know if you have any problems with v0.81.

This module seems perfect for recurring billing with authorize.net... however, I'm stuck at trying to implement a FREE-trial prior to the full monthly cost.

if you try to do a $0 charge (for CC verification for FREE trial followed by recurring billing), it won't go through authorize.net

I've been told that the ARB method below (they also have an API) has the ability to do a FREE trial, followed by recurring billing...

I beleive, this would have to be done via the specified API below, since authorize.net doesn't allow a $0 charge? or can this be done with this module? (i.e. add this api functionality)

any ideas?

**********from athorize.net ***************

Automated Recurring Billing (ARB) Service Help
Click on the links below to create new Automated Recurring Billing (ARB) subscriptions, view the status of subscriptions that you have added or uploaded to the Payment Gateway, search subscriptions, and configure ARB service email notifications. What is Automated Recurring Billing?

Create a New ARB Subscription
Add an ARB subscription to the Payment Gateway.

Integrate a Web Site to the ARB Service
Use the ARB application programming interface (API) to create your ARB subscriptions directly from your Web site or proprietary application.

View Status of Uploaded ARB Subscriptions
View the current status of ARB subscription files that have been previously uploaded to the Payment Gateway.

Search ARB Subscriptions
View and edit ARB subscriptions.

Configure ARB Email Notifications
Select the ARB email notifications that should be sent for your account including a daily transaction summary and notification of upcoming credit card and subscription expirations, failed transactions, and subscription suspensions and terminations.

I'm not sure if the CIM can accommodate this or not... I'd hope it would, but who knows. UC 1.4 will have ARB support in the core Auth.Net module which could ideally be combined w/ the free order payment method module I wrote to handle a setup like yours. I still have a little bit of work to do on it before it's releasable.

@duntuk - CIM should work for your needs. If you submit a $0 order with this module, it just validates the credit card. So you may not see anything in your Authorize.net account (like a $0 order), but if the transaction is successful then the card was validated.

@chadcrew the client has done several live credit card check now, and (hasn't provided full info) said it "can't process transaction"--just requested full details of error; i'll get those later hopefully.

I think the error has to do with having enabled 'anon' purchases.... I know the module specifies that 'anonymous' purchases are not supported, however the site I'm working is solely based on purchasing memberships (free trial followed by recurring), so you must be anonymous to purchase a membership (role)...

basically what happens, is anon user purchases a membership, if credit card is successfully charged, then his/her account at the time of successful checkout gets created and assigned a membership role...

(free trial for 7 days, then on 8th it gets billed full amount... followed by recurring billing each month for full amount)

Yeah, anon purchases definitely won't work without some serious hacking. My recommendation would be to let users sign up with a non-paying role and then upgrade to a paying role after a successful checkout.

Of course, if you can contribute a patch that works with anon users, I'd love to integrate it. Last time I looked into this though, there were some obstacles that made it fairly difficult.

Add a subscription in the shopping cart and then click "Checkout". Complete the credit card and billing address information, selecting "Canada" as the country and "British Columbia" as the zone. After clicking "Review order", the following error message is displayed:

An illegal choice has been detected. Please contact the site administrator.

At this point the zone select dropdown has been populated with US states. If I select a US state and then click "review", I receive the error again ... but this time the zone reverts back to Canadian provinces. If I now select a province and click "review" again, it successfully takes me to the Review Order page.

This is a great module! I'm using uc_cim and uc_recurring for recurring subscriptions on my site. However, uc_cim doesn't seem to be assigning a value to the 'fee_handler' field in the uc_recurring_users table. This prevents users from canceling their subscription since the 'cancel' Operation link on their user page is not visible. If I manually assign 'fee_handler' a value of 'uc_recurring' the link appears. If I assign it 'uc_cim', it disappears again.

The module does not work with Ubercart 1.6. It works perfect in a test environment using the "Test Developer" mode, but there are errors every time it runs in production against a live Authorize.net connection. The error messages in watchdog are as follows:

No updates from me. CIM is just not where it needs to be, and I cannot roll back to UC 1.4. We're just using standard Authnet payment gateway for the time being, strung together with a mix of uc_subscriptions and uc_roles.

(Yes, I know it makes no sense that we're using both uc_subscriptions and uc_roles at the same time. We're doing so because of the occasional problems we see with uc_subscriptions not recording renewals. The uc_roles module acts a 'fail-safe' to ensure we always know that a role has been extended. We then have to run some manual database scripts every couple of weeks to clean up issues due to uc_roles. Ugh ... I'll be glad when a lot of these problems are fixed.)

Just thought I'd let you guys know, I've got a working port of this module for D6 that even addresses a couple of the active bugs mentioned in 0.9. I'm gonna test it out for a little bit because it's still pretty fresh off the press, but as soon as it seems stable I'll post it up.

So here's my port for D6. I was hoping to test this on a production authorize.net account rather than just the developers test account, but maybe someone else can test it with theirs. I would love to hear how it's working if you do.
Besides that, everything seems to be working well for me so far. I believe I've tackled a couple bugs and even got a new feature or two in. If this turns into an official release I'll come up with the changes I've made for an official change log, but for now I'm just gonna say, try it out!

I'll fix any bugs that you guys discover so please be post them here. Chad - I know this is sort of an unorthodox way to approach co-maintaining, but since I need to use this module for a project, I'm gung ho about getting it ready to go. Let me know if you feel its necessary to coordinate more closely than this.

I'm currently using it with no problems on a production site. I've been in communication with Eidolon (he's posted above) who's also reported it's success.

I've been semi-actively developing this module to include bug fixes and new features as I need them personally. I will make a point to post an update of what I've got in the near future.

I'd be happy work on any bug reports that people want to post here or PM me about (PM is a better way to get my attention, but a public post alerts interested people of the issue, so maybe do both if possible) and provide fixes as I get to them.

I've spoken to the module maintainer about co-maintaining this as well, but haven't had much time to be proactive about it beyond the updates I've posted here. I will revisit that idea when I have a chance.

Allow anonymous checkout (will create the user's account just like ubercart normally handles the process)
Integrate with the new uc_recurring module. (http://drupal.org/project/uc_recurring)

As far as the recurring billing goes, As of ubercart 6.x-2.0-rc2, the recurring billing functionality which was previously in core, is now a contrib module. There have been great strides made in creating new orders for each recurring billing, and I have successfully tied this into uc_cim 6.x in a development environment.

I must stress the importance of the uc_cim module getting a proper project page on d.o so we can have a proper collaboration space. We need an issue tracker outside of a single comment thread on this page. I believe the uc_cim module is a great asset for ubercart 6.x, and it needs to be more well known, and a proper project page is the only way to do so.

I have attached my whole uc_cim.module file as well as a patch against the version in comment #21.

Hey guys and gals - I've taken the bug fixes / feature additions that I've implemented for this module over the past weeks as well as the ones from the patch above my comment and compiled them into an "unofficial release". Here's my unofficial change log (includes changes from the above post as well). My apologies if some of the bug fixes are vague... you know how it goes. I've also updated the readme file by creating an addendum at the bottom. This will be a little easier to manage when we have an official project page and official versions. I'm going to start one up in the near(est possible) future, so hang tight.

If you need to update the module you downloaded from comment 21 or 27: You shouldn't have any problems simply overwriting the whole folder from this zipfile.

If you're starting fresh: This is the complete package, grab it and roll.

Please share your experiences with the module, positive or otherwise to help further it's development or reinforce it's stability.

Enjoy for now!

-----------------------
New Features

- Uc_cim is now allowed to be used as a regular payment method. The CIM Credit Card payment method can be enabled (admin/store/settings/payment/edit/methods),
Credit Card should be disabled, the Payment Method pane can be enabled, the CIM Functionality pane must be enabled, and Payment Information pane can be disabled.
If you previously wanted to use uc_cim with additional payment methods, like checks or cod, now you can!
Alternately, you can still use the method outlined in the instructions above (README.txt).

- Added a new user credit card manager page: user/x/creditcards. Exists as a tab on your "My account" page that allows you to view, edit, or delete all of the credit cards that uc_cim has stored on your behalf.

- Authorize.net profiles are now able to be deleted from the local database even if there is no remote record of it (this can be helpful if you are using multiple sandboxes and data is getting shuffled around)

- Added support for anonymous checkout (thanks to todda00!)

- Added support for recurring fee handling via the new uc_reccuring module (thanks again todda00)

-----------------------
Bug fixes

- Check whether anonymous checkout is allowed before allowing to proceed and allow for checkout redirect if user logs in instead

- fixed a query error when resubmitting cc form

- fixed a bug where uc_cim could attempt to validate a cc number with masked values

Small note, i suppose: Just noticed that in the Readme file, installation step 4 notes that the anonymous checkout is not supported. I'm guessing this is now a typo according to the note in the post above this that anonymous checkout is now good to go?

- user/%user/creditcards (Manage Credit Cards) was available to everyone if you can access someone's user page. This patch restricts access so users can manage their own cards, or anyone with the 'administer credit cards' permission.

- incorrect use of t() throws an error when creating a user account from anonymous checkout.

mrmeech - Anonymous checkout is good to go. The "addendum" to the readme file mentions this. The readme file should be rewritten and I suspect it will be when there is an official release of the updates that have been made to this module. For now, the readme is functioning as a bit of a changelog.

We are not using anonymous transactions or the recurring payments module. After applying the patch, activating the CIM module, carefully following all the instructions in the readme file and selecting the option to "Leave the Payment Method and Billing Information panes enabled, and disable Payment Information pane", we get an error message when using a credit card to checkout:

* warning: strtr() [function.strtr]: The second argument is not an array in /home/soblures/public_html/drupal6/modules/syslog/syslog.module on line 106.
* warning: strtr() [function.strtr]: The second argument is not an array in /home/soblures/public_html/drupal6/modules/syslog/syslog.module on line 106.
* We were unable to process your credit card payment. Please verify your card details and try again. If the problem persists, contact us to complete your order.

RickA - I'm not sure exactly what you mean when you say "we have not activated CIM with authorize.net", but if you mean that you do not have an account and API key with them, then this is definitely a reason why the module would fail.

The $variables array is new. So search for all calls to watchdog(). If there is a third argument, add "NULL," in front of that argument.

Even after you've made this fix, you will have errors when you visit the watchdog (admin/reports/dblog). These error messages are due to the invalid watchdog messages generated earlier. The errors will remain until they are cleared from the watchdog table (or unless you clear them out manually--delete any row with a type field of 'CIM' or a variables field of 'i:4').

I received an error because the uc_cim module was trying to create a new record in the uc_cim_payment_profiles table and the CVV value was missing. The database reported that the cc_cvv field did not have a default value.

My quick fix was to add a new argument to the end of the uc_cim_save_payment_profile() signature: "$cc_cvv = NULL". The function now looks like this:

I'm sure there's people out there using this module and are happy as ducks about it but I'm not at all pleased with it. It is in bad shape, poorly designed, and the sort of thing that can cause a lot of problems for you and suck a galaxy of time. I highly recommend reading the CIM gateway API docs at http://www.authorize.net/support/CIM_SOAP_guide.pdf and rolling your own.

Not trying to troll here. Forgive me, Mr ChadCrew. Just a bleary eyed programmer who once again feels like he's been screwed over by a shoddy Drupal module.

Just curious, but did you notice that the status is "Bug testing" and that the module is "not ready for moderation?" I would think that kind of verbiage on a module would give at least a semi-wary programmer means for pause?

And also, I think Ubercart 2 has support for CIM and ARB right out of the box. You might look into that instead.

As I mentioned in my previous message, CIM is handled by Ubercart 6.x-2.0 right out of the box. Go to admin/store/settings/payment/edit/gateways and under authorize.net settings there is a section for CIM integration.

Unless I'm mistaken, that should be all you need - you shouldn't even have to download this module in D6.

Add a subscription in the shopping cart and then click "Checkout". Complete the credit card and billing address information, selecting "Canada" as the country and "British Columbia" as the zone. After clicking "Review order", the following error message is displayed:

An illegal choice has been detected. Please contact the site administrator.

At this point the zone select dropdown has been populated with US states. If I select a US state and then click "review", I receive the error again ... but this time the zone reverts back to Canadian provinces. If I now select a province and click "review" again, it successfully takes me to the Review Order page.

This never got resolved. I'm experiencing the same problem in version 0.90. Here's a thread about a similar problem: http://drupal.org/node/285501. This has something to do with uc_cim's order pane.

It appears that the country is updated, but as far as the system (form validation?) is concerned, it is still the old country. The zones get re-populated with the old country's ones, and only upon another submission they get corrected. Somehow the "country" only gets really updated on a page refresh. This looks like a JS problem.

Any ideas?

Andrey.

UPDATE: Hmmm... I put an alert('1'); first thing in the uc_cim_apply_address function, and it doesn't show up on the address change. It looks like it's not even called.

Have everything integrated. Works fine in test mode but when I move it into production mode the card won't go through. Verified it isn't a card issue with credit card company, transaction does not appear to be making it to authorize.net. When the test transaction is ran the order shows up, but there is no way to view the card. It sounds like I'm missing a step but I've checked and double checked everything I know how to. Suggestions? I'm under the gun on this so any help would be really appreciated.

2 things:
Firstly, the most recent version of this module is posted as a zip file in the comments above. There is not an updated link on the project page, as the project page has not been updated in some time.

Second, as mentioned above - CIM integration has been added to Ubercart's included authorize.net module. I haven't taken it for a spin yet and so don't know how the features of each stack up, but I suspect that it will nullify any further development on this module.

If you're looking to use CIM, you should download/upgrade to the latest version of ubercart and try the authorize.net module.

Runs fine on 1.7 besides that... oh, just one more glitch with this error: "warning: unserialize() expects parameter 1 to be string, array given in /home1/luluband/public_html/lulubandhas/portal/sites/all/modules/ubercart/contrib/uc_cim/uc_cim.module on line 380."

I believe I have solved the problem which is creating errors along the line of "Raw CIM response: An error occurred while parsing EntityName. Line 1, position 605.".

At least in the case of the site I have been working on, these errors were caused by invalid characters in the description element submitted to authorize.net. For example, you cannot have an & in XML.

Although one could put in place a filter to escape all such characters, since the description element should contain only plain text, the easiest way to solve this problem is to notify the XML parser that it should treat it as text and not XML. The way to do this is to declare it as cdata.

Thus the solution is to change line 1910 of uc_cim.module from

'<description>'. $description. '</description>'.

to

'<description><![CDATA['. $description. ']]></description>'.

I apologize for not submitting a patch, but the change seems simple enough so as not to require one, especially as this module is no longer being actively maintained.

I know that Ubercart 6.x-2.x has CIM out of the box, but doesn't provide anywhere near the functionality that this module does, most notably storing credit card for repeat customers. Until advanced CIM functionality makes it into core Ubercart, this module is definitely needed for Ubercart 6.x-2.x.

It looks like #30 posted a 6.x version; is there any plans for work on a release version? There was also talk earlier about an official page on d.o, so there can be more active collaboration, are there also any plans to move forward with that?