Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Authorize Net AIM module


Vger

Recommended Posts

thank you! thank you! thank you! i hope you make tons of money this year for all the good karma helping me ...my store would not even function without your help!

 

some people will get further in life than others and frenchy your a good example of someone that is going to accomplish anything they set their mind to. i realize most don't ...i myself live my dreams i hope you live yours and thank you for fixing my broken store

 

if anyone needs to run their authorize.net account with a pipes response setting here is the answer

 

thanks again frenchy!

 

 

 

 

for bugajski1

 

I got it working with pipes, as promised. got expected responses for approved and declined with the merchant AN account in TEST mode/

 

3 easy steps:

 

in includes>modules>payment>authorizenet_aim.php

 

look for

 

 $submit_data = array(
x_login => MODULE_PAYMENT_AUTHORIZENET_AIM_LOGIN, // The login name as assigned to you by authorize.net
x_tran_key => MODULE_PAYMENT_AUTHORIZENET_AIM_TXNKEY,  // The Transaction Key (16 digits) is generated through the merchant interface
x_relay_response => 'FALSE', // AIM uses direct response, not relay response
x_delim_data => 'TRUE', // The default delimiter is a comma

 

just below, add

 

  x_delim_char => '|',

 

further down, look for:

 

// Parse the response code and text for custom error display
  $response_code = explode(',', $response[0]);
  $response_text = explode(',', $response[3]);
  $x_response_code = $response_code[0];
  $x_response_text = $response_text[0];

 

replace by

 

 // Parse the response code and text for custom error display
  $response_code = explode('|', $response[0]);
  $response_text = explode('|', $response[3]);
  $x_response_code = $response_code[0];
  $x_response_text = $response_text[0];

 

and of course the last step is done in the authorizenet account:

 

go to: ACCOUNT > SETTINGS > TRANSACTION FORMAT SETTINGS

 

click on the link direct response: your menu should be on pipe.

 

See Vger? not that hard ;-)

Link to comment
Share on other sites

Little bug fix: the invoice number is not passed correctly to Authorizenet (it is always 1).

 

In includes/modules/payment/authorizenet_aim.php, look for

 

$last_order_id = tep_db_query("select * from " . TABLE_ORDERS . " order by orders_id desc limit 1");
$new_order_id = $last_order_id->fields['orders_id'];
$new_order_id = ($new_order_id + 1);

 

and replace by:

 

$last_order_id = "select orders_id from " . TABLE_ORDERS . " order by orders_id desc limit 1";
$result = @mysql_query ($last_order_id);
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {$new_order_id = $row[0];};
$new_order_id = ($new_order_id + 1);

Link to comment
Share on other sites

Has anyone had success in getting the Authorize.net Aim module to work properly with a Windows IIS-hosted OSC store? There was some discussion earlier in this thread, but when I contacted the individual directly to see if he was successful he told me he had given up on it...Anyone else have better luck?

Thanks,

Bob

Link to comment
Share on other sites

Is there a way to keep the CC# from being written to the DB? I'd rather avoid the hassle of encrypting and just not have it at all. There was some discussion about it earlier but nothing was posted about a solution.

 

The only option that would make sense to me would be to erase the CC number by programmation when the amount is charged. Because AUthnet NEEDS the CC number in order to charge, and it retrieves it from the DB before it's passed.

 

so something like a query in the table orders that updates the credit card number that matches the one that has just been processed and set it to null should do the trick

 

 

my skills in php mysql are not good enough to tell you where exactly to insert this query in authorizenet_aim.php though

Link to comment
Share on other sites

Hi i was looking through the thread and could not find any info on eprocessing network. Will authorize net AIM work with eprocessing network? I am trying to find a transparent module to use their TDBE. I was told that the Authorizenet AIM module would do this. It this true?

Thanks for any help.

Link to comment
Share on other sites

Hi i was looking through the thread and could not find any info on eprocessing network. Will authorize net AIM work with eprocessing network? I am trying to find a transparent module to use their TDBE. I was told that the Authorizenet AIM module would do this. It this true?

Thanks for any help.

 

what is eprocessing network?

Link to comment
Share on other sites

Well. according to their info the 'eProcessing Network' is like the old Pay Pal 'Add To Cart' button system. You put 'Buy Now' buttons on your website, and clicking them takes you offsite to a payment page. So what that has to do with Authorize Net is beyond me. It's also nothing to do with osCommerce.

 

Vger

Link to comment
Share on other sites

Well. according to their info the 'eProcessing Network' is like the old Pay Pal 'Add To Cart' button system. You put 'Buy Now' buttons on your website, and clicking them takes you offsite to a payment page. So what that has to do with Authorize Net is beyond me. It's also nothing to do with osCommerce.

 

Vger

 

That what I thought :-) If it's another gateway, nothing has been developped for it yet.

Link to comment
Share on other sites

It is a gateway and it has been around for a while. I guess not many people here use it. There is a contribution for it.

 

http://www.oscommerce.com/community/contributions,559

 

But like Vger said it takes you to their web site. They do offer a way of creating a transparent gateway but the one that is here for oscommerce does not work:

 

http://www.oscommerce.com/community/contributions,1317

 

They have documentation to help out developers but I do not know how to program PHP. The documentation can be found here:

 

http://www.eprocessingnetwork.com/tdbe.html

 

Eprocessing said that they will not develop one because of securuty issues with Visa and Mastercard but they said I could create one if I wished. Again I am not a PHP programmer.

 

I read in another thread that someone was using Authorize net to access eprocessing. I was also told by another shopping cart company that I could use their Authorize Net gateway to access Eprocessing because it was an AIM module.

 

So I was hoping someone here might know how to get this Authorize Net AIM to work with Eprocessing Network?s gateway. Or maybe they knew someone who could fix the ADC contribution that was once created.

Thanks for your time and help.

Daniel

Link to comment
Share on other sites

High there,

 

i posted the same problem before back in August.

It looks like my aim module does not connect to the athorize server at all.

 

If switched to live mode and using the test credit card numbers provided with the mod (i can enter any auth NET login name and key in admin) i get no error message or other clues, i land directly on checkout confirmation.

 

After going through all 20 pages of the forum It seems like i am the only one who ever faced that problem.

 

I have CURL and a own SSL certificate.

 

Help :blush:

 

Thanks in advance

 

Chris

Link to comment
Share on other sites

High there,

 

i posted the same problem before back in August.

It looks like my aim module does not connect to the athorize server at all.

 

If switched to live mode and using the test credit card numbers provided with the mod (i can enter any auth NET login name and key in admin) i get no error message or other clues, i land directly on checkout confirmation.

 

After going through all 20 pages of the forum It seems like i am the only one who ever faced that problem.

 

I have CURL and a own SSL certificate.

 

Help :blush:

 

Thanks in advance

 

Chris

 

please post your catalog side configure file (cookie path and domain especially), that might be the reason

Link to comment
Share on other sites

Oh that was fast, thanks,

 

here the configure.php:

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.xxxxxxx.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://xxxxxxx.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', TRUE); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'xxxxxxx.com');

define('HTTPS_COOKIE_DOMAIN', 'xxxxxxx.com');

define('HTTP_COOKIE_PATH', '/usa/');

define('HTTPS_COOKIE_PATH', '/usa/');

define('DIR_WS_HTTP_CATALOG', '/usa/');

define('DIR_WS_HTTPS_CATALOG', '/usa/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

I think i aready checked this back in August...

 

Thanks

 

Chris

Edited by roedel
Link to comment
Share on other sites

Oh that was fast, thanks,

 

here the configure.php:

I think i aready checked this back in August...

 

Thanks

 

Chris

 

your config is fine

 

you must test in live mode in OSCOM and test mode in AUTHNET, did you do that?

Link to comment
Share on other sites

Yes, OSC is in live mode.

 

My test account at authorize net is currently down, i wait for a feedback from auth. nets tech support.

 

Back in August the test account was up and running, i had the same problem.....

 

But anyway, shouldnt i get some kind of auth-net error message using a fake login and key?

Link to comment
Share on other sites

Yes, OSC is in live mode.

 

My test account at authorize net is currently down, i wait for a feedback from auth. nets tech support.

 

Back in August the test account was up and running, i had the same problem.....

 

But anyway, shouldnt i get some kind of auth-net error message using a fake login and key?

 

I haven't tried a fake log and key, so I have no idea what it gives yo (and I cannot try that, all our sites are live)

but did you try to SUBMIT the order and see what response you have in the dark red stripe at the top AFTER the checkout_process.php?

Link to comment
Share on other sites

Tried all the CC Test numbers that come with the Aim module

Automatic Approval Credit Card Numbers:

 

Visa#: 4007000000027

MC#: 5424000000000015

Discover#: 6011000000000012

AMEX#: 370000000000002

 

Note: The credit card numbers above will return a decline in Live mode, and an approval in Test mode. Any future date can be used for the expiry date and any 3 digit number can be used for the CVV Code (4 digit number for AMEX)

 

Automatic Decline Credit Card Number:

 

Card #: 4222222222222

 

Use the number above to test declined cards.

 

They all go throught without any error message, in live or test mode, thats kind of odd...

Link to comment
Share on other sites

Tried all the CC Test numbers that come with the Aim module

 

They all go throught without any error message, in live or test mode, thats kind of odd...

 

please confirm that you recieve the emails and that teh order appears in your backend

Link to comment
Share on other sites

pixclinic,

 

Thank you thank you thank you.

 

I am stupid, i never went over /checkout_confirmation.php when testing this mod.

I thought the error message should appear at this step, should have known better ...

 

 

Have a nice weekend,

 

Chris

Link to comment
Share on other sites

pixclinic,

 

Thank you thank you thank you.

 

I am stupid, i never went over /checkout_confirmation.php when testing this mod.

I thought the error message should appear at this step, should have known better ...

Have a nice weekend,

 

Chris

 

You're welcome.

Yes the whole point of AIM is to have a completely transparent workflow: you know nothing before the end of the process. Plus if your AN is down, that doesn't help to diagnose...

Link to comment
Share on other sites

Absolutely fantastic, works great, thank you Vger!

 

My only 'tweak' is on checkout_confirmation.php under Payment Method (Edit) it displays ...

 

Payment Method (Edit)

authorizenet_aim

 

How do I make it display?

 

Payment Method (Edit)

Credit Card

 

Cheers,

EricK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...