Authorize.net (SIM) payment method

Contrib type: 
Module
Status: 
Initial upload
Compatibility: 
Ubercart 1.x

Created this module for a client of ours as they were using the Authorize.Net Server Integration Method (SIM) module and I couldn't find any module for it among Übercart's contribs.

Anyway, from the site:

==
SIM uses scripting techniques to authenticate transactions with a unique transaction fingerprint. SIM provides a customizable, secure hosted payment form to make integration easy for Web merchants that do not have an SSL certificate. The Authorize.Net Payment Gateway can handle all the steps in the secure transaction process — payment data collection, data submission and the response to the customer — while keeping Authorize.Net virtually transparent. View this guide.

* Payment gateway hosted payment form employs 128-bit SSL data encryption.
* Digital fingerprints enhance security, providing multiple layers of authentication.
* Customize the look and feel of the payment gateway hosted payment form and/or receipt page.
==

Like the AIM module, there are 3 transaction modes :
- Production - which connects to https://secure.authorize.net/gateway/transact.dll with x_test_request set to false
- Live-test - which connects to https://secure.authorize.net/gateway/transact.dll with x_test_request set to true
- Test - which connects to https://test.authorize.net/gateway/transact.dll with x_test_request set to true

Settings also include:
- Login
- Transaction Key
- Currency Code
- FDS
- Transaction Type
- Logo URL (for the Authorize.net page)
- Background URL (for the Authorize.net page)
- Link Text (for the redirect back button)

To install, just download and extract into the /ubercart/payment directory.

NOTE: so far, this has been tested with the in Test mode. Waiting for my client to give me the go signal to test with the 2 other modes.

NOTE [20080611] : this has been tested on the production and live test modes already. both worked. Smiling

-- sarah (woohoo! first attempt at a module.)


PreviewAttachmentSize
uc_authorizenet_sim.tar.gz91.36 KB
Joined: 08/12/2008
Juice: 33

Two problems I found implementing this module, that I was able to fix.

line 300 users hash_hmac which is only in php 5. If you're running php4 you can add this function

function hmac ($key, $data){
return (bin2hex (mhash(MHASH_MD5, $data, $key)));
}

and then use $fingerprint = hmac($txn_key, $login . "^" . $sequence . "^" . $tstamp . "^" . $amount . "^" . $ccode);

instead of $fingerprint = hash_hmac('md5', $login . "^" . $sequence . "^" . $tstamp . "^" . $amount . "^" . $ccode, $txn_key);

Second problem is that the amount wasn't formatted correctly so authnet was rejecting it, so to fix that underneath
$amount = $order->order_total;
I added:

$amount = uc_currency_format($amount, FALSE, FALSE, '.');

Joined: 02/11/2009
Juice: 2

Could anyone be able to port this to DRUPAL6? I've tried, but keep running into problems

Joined: 03/30/2009
Juice: 4

Some of these instructions can get really complicated if you are not familiar with the the programming language. But we have been recommending ubercart because of the simple integration with Authorize.net

-Join the best
http://menexis.com

-Join the best
http://menexis.com

Joined: 08/14/2007
Juice: 3864

I am going to attempt porting this to D6. Are there any known issues with doing so? It looks like this had been attempted before with no luck. Any pointers are helpful.

Help directly fund development: Donate via PayPal!

Joined: 07/27/2009
Juice: 14

Any luck Torgo's? I need to accomplish something similar and was wondering if you have made any progress. Thanks bud.

Joined: 08/14/2007
Juice: 3864

Unfortunately I haven't, time hasn't been on my side lately. Feel free to pick it up if you like.

Help directly fund development: Donate via PayPal!

Joined: 08/25/2009
Juice: 8

Hey y'all,

Ported this to Drupal 6 for a client site. It was a fast job, but it works fine as far I've tested it. Let me know how it works for you.

Dominic
http://beardedstudio.com

AttachmentSize
uc_authorizenet_sim.tar.gz 92.77 KB
Joined: 11/28/2009
Juice: 2

Hi Dominic,

Thanks for posting the D6 module.

Unfortunately I'm getting an error when I try to submit my order (the transition from my Drupal site to the Authorize.net server). It's error code 99, which means "The server-generated fingerprint does not match the merchant-specified fingerprint in the x_fp_hash field."

Authorize.net has a help page about response code 99 at https://developer.authorize.net/tools/responsecode99/

Also, is there a newer version of this module I should be using? On my Modules screen, the description of your module is "Authorize.net SIM only OLD UNSUPPORTED." Is there a different one I should download?

Best wishes,
Andrea

Joined: 04/06/2008
Juice: 49

I have attached the updated and working Drupal 6 (UCv2) version. It had the same problem as mentioned about with the currency casting.

Zach Ferres,
Bouncehost

AttachmentSize
uc_authorizenet_sim.zip 97.74 KB
Joined: 10/04/2009
Juice: 17

Hello:

First thanks for everyone working on this module, it was really helpful for me. I tested the module and it works fine, I managed to be redirected to the payment form on the Authorize.net servers, so I guess it should not be a problem to proceed on the payment (Currently on live test mode - ubercart, and test mode on my merchant account). I just want to know if this is a stable version, is it safe to use on a production site, I have not gone live with my shop, I am still in testing mode, but just wanna be sure is safe to use in a production mode.

Thanks

Joined: 01/01/2010
Juice: 7

Has anyone else encountered problems with this module not updating the order status after the payment is processed? The order status should be updated to "payment received" but it stays at "in checkout".

Also, when a payment is accepted the customer is directed to an authorize.net receipt page with a link that says ist goes to cart/authorize_net/complete but it actually goes to the cart.

Another problem is customer accounts are no longer being setup and all transactions are added under customer id 0

I am also not getting the customer and admin invoices emailed with this.

Anyone else experience these issues and/or have tips?

Joined: 01/01/2010
Juice: 7

OK, I solved my problem with the payment info not returning and posting to my site. It turns out I had a merchant defined field that was interfering with the order id which interfered it from posting to my database.

So everything works except I am noticing that the customer and admin invoice emails from ubercart are not going out and the payment status is not posted unless the customer clicks the defined "continue" link on the receipt page. I have customized the text in that link button to state "CLICK HERE to FINALIZE and EMAIL RECEIPT" to try and help encouragement of customers clicking it and not just closing the browser. Is there another way to get the payment info posted or has no one else ran into this problem?

Joined: 02/15/2010
Juice: 5

Is there any reason why this hasn't been contributed to drupal.org?