Jump to content
Sign in to follow this  
Vger

[CONTRIBUTION] Authorize Net AIM module

Recommended Posts

Hello,

 

I would like to thank Vger for this great contribution that helps tremendously and also anyone whom has helped to make it great.

 

I'm having an issue though with a Handling Fee module. The link to the module is: http://www.oscommerce.com/community/contri...ch,handling+fee

 

Basically, this Handling Fee module adds an extra field in the checkout process to show the customer what the handling fee is. Currently, it is adding my set handling fee of $3.00 and is calculating it in the order total on the invoice and checkout in the shopping cart.

 

However, this Handling Fee is not being passed to Authorize.net using the Authorize.net AIM Module. Is there anything I need to add to the code to pass this handling fee variable to calculate the order total when sending it to Authorize.net (in the php file)?

 

ex. OsCommerce Cart show total order of $25.00 (with the $3.00 handling fee), however authorize.net is only charging $22.00 (so it is excluding the handling fee). (There also was a similar issue with Paypal-IPN -and the fix was FIND $parameters['currency_code'] = $my_currency;

 

PASTE ABOVE THE FOLLOWING

 

//Handling Fee Contribution: Fix by Marcello Sales Sep1306 START

if (MODULE_ORDER_TOTAL_HANDLINGFEE_STATUS == "true"){

$parameters['handling'] = number_format(MODULE_ORDER_TOTAL_HANDLINGFEE_FEE * $currencies->get_value($my_currency, $currencies->get_decimal_places($my_currency));

}

//Handling Fee Contribution: Fix by Marcello Sales Sep1306 END )

 

 

Any help would be much appreciated. Thank you

Edited by vincent2006

Share this post


Link to post
Share on other sites

I'll try and make this quick, but basicaly yea i am getting the same error a lot of people are getting.

 

- Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.

 

I have setup a fresh install of Oscommerce, implamented the Authorize.net AIM mod, step by step.

I am using php, mysql, curl, and https, all verified working.

My Authorize.net settings are set accordingly, Version 3.1 AIM, No, Comma, Blank.. etc

Edit the authorizenet.net file and changed line 301 to https://certification.authorize.net/gateway/transact.dll

Safe mode is OFF

Registered Globals of course is ON

 

NOTE I have also setup Cube Cart, and used thier Authorize.net AIM module and that works perfectly. The transaction went through with no errors and was accepted.

 

I even used the same CC information on both oscommerce and Cubecart just to make sure.

 

Another intresting fact is that I tried a third cart, called Zen cart, I get the same error in red intrestingly enough it looks like it's built from oscommerce? So what does this mean? I have read through all 22 pages and notice many people are getting this generic error, for some reason no Authorize.net CODE is coming through, there should be a number in the red error message.

 

So I am thinking maybe its related to CURL?

But if CubeCart is working fine why wouldnt Oscommerce and Zen Cart be working fine, maybe its the way they are using curl? I'll further investigate the code and compare it to CCart. If CubeCart works then Oscommerce and ZenCart should work?

 

Here is my oscommerce configuration file just for the heck of it. (Note: this was auto-generated from fantastico)

 

<?php

 

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

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

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

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

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

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

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/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/website/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'username');

define('DB_SERVER_PASSWORD', 'password');

define('DB_DATABASE', 'db_osc1');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

I really like oscommerce have been using it for years and recently decided to use AIM but dang this has gotten me stumped for days! If you need anymore information let me know I'll post it.

Edited by negativerad

Share this post


Link to post
Share on other sites
I'll try and make this quick, but basicaly yea i am getting the same error a lot of people are getting.

 

- Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.

 

I have setup a fresh install of Oscommerce, implamented the Authorize.net AIM mod, step by step.

I am using php, mysql, curl, and https, all verified working.

My Authorize.net settings are set accordingly, Version 3.1 AIM, No, Comma, Blank.. etc

Edit the authorizenet.net file and changed line 301 to https://certification.authorize.net/gateway/transact.dll

Safe mode is OFF

Registered Globals of course is ON

 

NOTE I have also setup Cube Cart, and used thier Authorize.net AIM module and that works perfectly. The transaction went through with no errors and was accepted.

 

I even used the same CC information on both oscommerce and Cubecart just to make sure.

 

Another intresting fact is that I tried a third cart, called Zen cart, I get the same error in red intrestingly enough it looks like it's built from oscommerce? So what does this mean? I have read through all 22 pages and notice many people are getting this generic error, for some reason no Authorize.net CODE is coming through, there should be a number in the red error message.

 

So I am thinking maybe its related to CURL?

But if CubeCart is working fine why wouldnt Oscommerce and Zen Cart be working fine, maybe its the way they are using curl? I'll further investigate the code and compare it to CCart. If CubeCart works then Oscommerce and ZenCart should work?

 

Here is my oscommerce configuration file just for the heck of it. (Note: this was auto-generated from fantastico)

 

<?php

 

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

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

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

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

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

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

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/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/website/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'username');

define('DB_SERVER_PASSWORD', 'password');

define('DB_DATABASE', 'db_osc1');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

I really like oscommerce have been using it for years and recently decided to use AIM but dang this has gotten me stumped for days! If you need anymore information let me know I'll post it.

 

you need to be in production, not test mode on the OsCom admin.

you need to be in test mode on the AuthNet site

 

Try again, this should now display the correct messages

Share this post


Link to post
Share on other sites
I get the same error in red intrestingly enough it looks like it's built from oscommerce?

 

Well, sort of. The team that built Zen Cart were ex team members of osCommerce. However, it's moved on a lot since those days.

 

Vger

Share this post


Link to post
Share on other sites
You were right Vger. Thanks!

 

The lingo here is getting sloppy LOL

Live (production mode) on Osc, or Authorize.NET?

 

Currently I have tried..

 

Test & Live mode on Osc , with Test mode set on Authorize.Net

 

are you suggesting I turn Authorize.NET on live mode to test this module?

Share this post


Link to post
Share on other sites
are you suggesting I turn Authorize.NET on live mode to test this module?

 

Yes. Their test functionality is total pap.

 

Vger

Share this post


Link to post
Share on other sites

Well I tried it in Live mode on both sites and I still get the same red error.

 

It seriously baffles me, because it works in CubeCart so why not in Osc, that's what really get's me. You think it could be any other server or php flags that could be causing the error?

 

Also is there anyway I can see the error string that comes back from Authorize.net?

Edited by negativerad

Share this post


Link to post
Share on other sites

Mmm? You do have SSL installed on your site? You can't connect without it.

 

Vger

Share this post


Link to post
Share on other sites

Yea and like i said in my previous post, its very odd that Authorize.net AIM module for Cube Cart works perfectly fine but when I try and use Oscommerce or ZenCart it doesn't work... so what's that say? I mean that has to mean something. I've gone over everything many times I just can't see what it could be.

 

Another quick fact, the original Authorize.net SIM module that comes with Osc works as well.

 

Yes I always use SSL

Edited by negativerad

Share this post


Link to post
Share on other sites

1. SIM is being discontinued by A Net soon.

2. CubeCart is total pap.

3. It's probably a cURL problem which usually occurs on Windows servers.

 

Vger

Share this post


Link to post
Share on other sites
1. SIM is being discontinued by A Net soon.

2. CubeCart is total pap.

3. It's probably a cURL problem which usually occurs on Windows servers.

 

Vger

 

 

Yea I know SIM is being discountinued but for the record I was just stating that it works, and your AIM Mod wasn't, strictly for reference. I posted all my information here in hopes people would read it.

 

Whatever opinions you have about any other ecommerce stores really doesnt matter, the facts are that CubeCart AIM Authorize.net module works

 

I've went out of my way and tried 3 other other shopping carts on the same server, which is Linux not Windows, I tried CubeCart, phpShop, and Xcart, and all 3 of them the Authorize.net AIM payment modules works.

Share this post


Link to post
Share on other sites

If you look back through this thread you'll see that the vast majority of posts are from people who say something similar to "Great module - works right out of the box". So if you can't use it then it indicates a problem with your site setup and not with this module.

 

Vger

Share this post


Link to post
Share on other sites
If you look back through this thread you'll see that the vast majority of posts are from people who say something similar to "Great module - works right out of the box". So if you can't use it then it indicates a problem with your site setup and not with this module.

 

Vger

 

 

Yes my point exactly!

 

Maybe you or somebody who has it working could post your apache and php config files, it is very possible there are things that aren't set that you have not mentioned in your setup documents because you where unware, which would explain why it works for you and a handful of other people.

Share this post


Link to post
Share on other sites
which would explain why it works for you and a handful of other people

 

No, you've got it the wrong way around. It's only a handful of people who have not been able to get it working on their site.

 

The php.ini file and httpd.conf file is different for each server steup.

 

Vger

Share this post


Link to post
Share on other sites

I just tried it on another server and its still not working, I even had somebody else try it, and they couldnt get it working either they recieved the same generic error, but whatever that doesnt help any.

 

So if it's not your mod then maybe it is a php.ini or apache setting, so

can somebody who has it working be kind enough to post there files.

 

What would it hurt?

 

Thanks

Share this post


Link to post
Share on other sites
I just tried it on another server and its still not working, I even had somebody else try it, and they couldnt get it working either they recieved the same generic error, but whatever that doesnt help any.

 

So if it's not your mod then maybe it is a php.ini or apache setting, so

can somebody who has it working be kind enough to post there files.

 

What would it hurt?

 

Thanks

 

negativerad,

 

Are you using a real credit card or one of the test card numbers? Try putting osc and authorize.net in live mode and use a real credit card (your own). Sometimes the test card numbers don't quite work.

Share this post


Link to post
Share on other sites
negativerad,

 

Are you using a real credit card or one of the test card numbers? Try putting osc and authorize.net in live mode and use a real credit card (your own). Sometimes the test card numbers don't quite work.

 

Yes I tried a real visa and a real american express card, both gave same generic red error.

Share this post


Link to post
Share on other sites

Hey,

I am having huge issues with this contribution and I would appreciate any help you guys can give me.

 

When someone places an order it is double authorizing and in authorize.net I see that the first new charge has the same invoice number as the previous authorize order and the second authorize has the new order number.

 

The heart of the issue is that it is 2x authorizing. luckily I only have it on authorize and not also capture... so I have been able to manually void one of the charges... but this is a pretty big issue.

Share this post


Link to post
Share on other sites
Hey,

I am having huge issues with this contribution and I would appreciate any help you guys can give me.

 

When someone places an order it is double authorizing and in authorize.net I see that the first new charge has the same invoice number as the previous authorize order and the second authorize has the new order number.

 

The heart of the issue is that it is 2x authorizing. luckily I only have it on authorize and not also capture... so I have been able to manually void one of the charges... but this is a pretty big issue.

 

did you try do set it to authorize AND capture?

Share this post


Link to post
Share on other sites

Each time I've ran a test purchase on my site, I get to checkout_confirmation.php, click on "Confirm Order" and then I get redirected to login.php. Not only that, I notice it logs me out too. No errors...nothing.

 

A few quick facts:

- On my Authorize.net Test account

-- the Current Version is 3.1

-- the Account is in TEST MODE

 

- Admin Section -> Payment Modules -> Authorize.net AIM -> Transaction Mode: Live

And I've tried "Test" as well.

Share this post


Link to post
Share on other sites
Each time I've ran a test purchase on my site, I get to checkout_confirmation.php, click on "Confirm Order" and then I get redirected to login.php. Not only that, I notice it logs me out too. No errors...nothing.

 

A few quick facts:

- On my Authorize.net Test account

-- the Current Version is 3.1

-- the Account is in TEST MODE

 

- Admin Section -> Payment Modules -> Authorize.net AIM -> Transaction Mode: Live

And I've tried "Test" as well.

 

wondering id your configure.php file (customer side) is Ok. could you post your cookies paths, domains and https paths?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×