Jump to content
Sign in to follow this  
Vger

[CONTRIBUTION] Authorize Net AIM module

Recommended Posts

Kevin,

 

Thanks, I will work my way back wards through this and see if I can find it.

 

Troy

Share this post


Link to post
Share on other sites

Okay, I think I get what your taling about with the delimiter bit. I will try to set it to a , instead of a pipe.

 

Troy

Share this post


Link to post
Share on other sites

Okay, that didn't help.

 

I wonder why the Expiration Date works for Stock CC Payment module, but it fails out for the Authorize.net AIM mod. That doesn't make any sence to me.

 

Maybe something with the Checkout_confirmation.php?

Share this post


Link to post
Share on other sites

Getting this error "The expiry date entered for the credit card is invalid.<br>Please check the date and try again."

Share this post


Link to post
Share on other sites
Okay, I think I get what your taling about with the delimiter bit. I will try to set it to a , instead of a pipe.

 

Troy

 

I was getting the same error. Changed

 

tep_draw_hidden_field('authorizenet_aim_cc_expires_month', $_POST['authorizenet_aim_expires_month']) .

tep_draw_hidden_field('authorizenet_aim_cc_expires_year', $_POST['authorizenet_aim_expires_year'], -2) .

 

 

to

 

tep_draw_hidden_field('authorizenet_aim_cc_expires_month', $this->cc_expiry_month) .

tep_draw_hidden_field('authorizenet_aim_cc_expires_year', substr($this->cc_expiry_year, -2)) .

 

 

around line 180 in modules/payment/authorizenet_aim.php

 

And that solved the problem.

 

(Not sure why $_POST['authorizenet_aim_expires_month'] is null at this point in the code whereas $this->cc_expiry_month is not, but that was the case.)

Share this post


Link to post
Share on other sites

I was having the "There has been an error processing your credit card. Please try again and if problems persist, please try another payment method." error message with this module as well. After digging through hundreds of threads on this topic I finally was able to get my mod working.

 

First issue to resolve is to make sure CURL is configured on your hosting provider. To verify contact your host and ask. I was hosted on a windows machine using webhost4life and caused some issues but working with them I was able to resolve it. I also used the "sample php" code on the http://developer.authorize.net/samplecode/ site and put in my user id and API key and was able to rule that issue out. It's generic code that will allow you to run a test and return the error codes from authorize to tell if you are getting values back. If you get a success with that code CURL and your API login credentials are most likely setup correctly.

 

A couple of things to remember with these modules:

1. If you have a "test" account set up you will want to use the test mode but if you have a real authorize.net account setup with it in "test mode" you will want to run everything in "live" settings mode in the module.

 

2. Set Transaction version = 3.1 (this is AIM) in the Authorize.net settings

 

3. Set your Direct Response Delimiter in the Authorize.net settings

Delimited Response: no

Field separator: comma(,)

Field Encapsulation Character: blank

 

4. Set your response/receipt URLs in your authorize.net settings

https://yourdomian.com/catalog/checkout_confirmation.php (Default Receipt URL)

https://yourdomain.com/catalog/checkout_process.php (Default Relay Response URL)

 

5. Be careful using these but use a logger on these modules - in my case I was making it to through the OSC shopping cart process only to find that I was not passing the CC info to authorize because of an incorrect </form> tag in the checkout_confirmation.php code. I ended up using the authorizenet_cc_aim.php module as it was the most updated at the time and found this post to be spot on to the issue I was having of not passing the CC data and getting the error sending me back to the payment page - http://forums.oscommerce.com/index.php?sho...t&p=1280555. The post by Jeff Wigal also includes a logger for viewing the info you are passing to authorize and the response you are getting back from them. Again make sure you delete the logged info when you are done testing and delete or comment out the code. There is also a logger for the authorizenet_aim.php by Joshua Morris for the Authorize Net AIM module (GPL) - vger module here http://forums.oscommerce.com/index.php?sho...t&p=1283835

 

For me changing the checkout_confirmation.php tags worked. I did read through all these posts and followed the advice for setting up the MD5 hash as well. I am now able to run a credit card successfully so I am just trying to pass along what worked for me to others that maybe having the same issue. I am not a developer but these posts were easy enough to follow and test. I would recommend you backup any code that you will be changing and follow the advice of the posters about deleting any files that the loggers create - it's sound advice.

 

Jon

Share this post


Link to post
Share on other sites

Sup peeps, I just have one simple question - With this module, if a credit card gets declined for ANY reason at all - how can that be automatically reflected on the order within the admin. Is there a setting for this in oscommerce rc2a? Can I set up in oscommerce to email declined notifications?

 

Thanks!

Share this post


Link to post
Share on other sites

I'm running osCommerce Online Merchant v2.2 RC2.

 

I have all my authorize.net information correct.

 

I downloaded the latest version of Vger's Authorize.net AIM contribution, and just dropped it in my /includes/modules/payment directory, as the contribution page said.

 

Then, I logged into my admin panel, went to Modules >> Payment, and Activated the Vger's Contribution, and inputted all the correct information.

 

On the Modules >> Payment page in my admin panel, there are the following errors:

 

Warning: main(/home/mbbucket/public_html/shop/includes/languages/english/modules/payment/authorizenet_aim.php) [function.main]: failed to open stream: No such file or directory in /home/mbbucket/public_html/shop/admin/modules.php on line 136

Warning: main(/home/mbbucket/public_html/shop/includes/languages/english/modules/payment/authorizenet_aim.php) [function.main]: failed to open stream: No such file or directory in /home/mbbucket/public_html/shop/admin/modules.php on line 136

Warning: main() [function.include]: Failed opening '/home/mbbucket/public_html/shop/includes/languages/english/modules/payment/authorizenet_aim.php' for inclusion (include_path='/usr/lib/php:.:/usr/php4/lib/php:/usr/local/php4/lib/php') in /home/mbbucket/public_html/shop/admin/modules.php on line 136

 

Don't know how to fix that...

 

Then, on the frontend, when I add an item to my cart and go to checkout, on the checkout_confirmation.php page, it displays near the bottom:

MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_OWNER	   	Owner Name
MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_TYPE 		CC type
MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_NUMBER 		1234XXXXXXXX1234
MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_EXPIRES 		1234
MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CVV 		XXX

 

How do I change the MODULE_PAYMENT_.... text to say what I want it to say?

 

and FINALLY, when I confirm the checkout, it takes me to a blank white page with the following errors:

 

Warning: payment(includes/languages/english/modules/payment/authorizenet_aim.php) [function.payment]: failed to open stream: No such file or directory in/home/mbbucket/public_html/shop/includes/classes/payment.php on line 38

Warning: payment(includes/languages/english/modules/payment/authorizenet_aim.php) [function.payment]: failed to open stream: No such file or directory in/home/mbbucket/public_html/shop/includes/classes/payment.php on line 38

Warning: payment(includes/languages/english/modules/payment/authorizenet_aim.php) [function.payment]: failed to open stream: No such file or directory in/home/mbbucket/public_html/shop/includes/classes/payment.php on line 38

Warning: payment() [function.include]: Failed opening 'includes/languages/english/modules/payment/authorizenet_aim.php' for inclusion (include_path='/usr/lib/php:.:/usr/php4/lib/php:/usr/local/php4/lib/php') in /home/mbbucket/public_html/shop/includes/classes/payment.php on line 38
1054 - Unknown column 'transaction_details' in 'field list'

UPDATE orders SET cc_type = 'Visa', cc_owner = 'Credit Card Owner Name', cc_number = 'XXXXXXXXXXXX1234', cc_expires = '1234', transaction_details = 'Transaction ID|2533773056;AVS Response|Address (Street) and five digit ZIP match;Card Code Response|Match' WHERE orders_id = 2 LIMIT 1

[TEP STOP]

 

I changed the credit card owner name for security purposes. But, the order goes through in the Authorize.net account (status: Captured/Pending Settlement). And osCommerce sends a receipt email to the customer. So basically, everything is working, but this last page throws an error, instead of doing what it's supposed to do. How do I fix these small problems?? Has anyone had this problem before?

 

I could really use some insight here.

 

PS Thanks Vger's for the contribution! It works, just needs a little tweaking on my end.

Share this post


Link to post
Share on other sites

When testing in live mode, or demo mode, and you enter a number that is declined for some reason, it just goes right back to the payment page. It doesn't give you an error or anything, so it is kind of confusing.

 

What do I need to do to make the module show why it doesn't approve a credit card transaction, instead of just magicking itself back to the payment page?

 

There should be an indication of why you were kicked back there!!!

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

Hello.

 

I know that we can't save the full CC info on the server. It's saved encrypted in the database though. Is there any way to get the full CC info, let's say in email along with the order details before it becomes encrypted?

 

Thanks.

Share this post


Link to post
Share on other sites

I found a small add-on that emails the masked cc numbers to store owner. I'm getting the emails but the masked numbers are missing. Is there something that I'm not doing right here?

 

Here is the code I'm trying to integrate into checkout_process.php:

//+2509 - UNMASK CC# and send in email
 if(MASK_CC_NUMBER_EMAIL == 'true'){
   $unmasked_cc_num .= substr($cc_num, 0, $len);
   $unmasked_cc_cvv2 .= substr($cc_cvv2, 0, $len);
   $message =  EMAIL_MASK_SUBJECT_NAME . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n\n" .
           EMAIL_MASK_TEXT_1 . "\n\n" .
           EMAIL_MASK_TEXT_2 . "<b>" . $unmasked_cc_num . "</b>\n" .
           EMAIL_MASK_TEXT_CVV2 . "<b>" . $unmasked_cc_cvv2 . "</b>\n\n" .
           $len . ' of ' . strlen($cc_num) . "" . EMAIL_MASK_TEXT_3 . "\n" .
           EMAIL_MASK_TEXT_4;
   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_MASK_SUBJECT_NAME . $order->customer['firstname'] . ' ' . $order->customer['lastname'], $message, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
 }
//-2509

May be somebody can give me any ideas?

 

Thanks.

Share this post


Link to post
Share on other sites

Hello,

 

My OSC version is ms2. I also have SIM which is working. I'd like to use AIM so I installed this contribution: http://addons.oscommerce.com/info/5662.

 

I couldn't get AIM working. The error message I got is:

 

 

Warning: Missing argument 1 for javascript_validation() in /home/content/f/c/1/fc1993/html/testingsite/includes/classes/payment.php on line 82

 

where line 82 is:

if (is_array($this->modules)) {
       $js = '<script language="javascript"><!-- ' . "\n" .
             'function check_form() {' . "\n" .
             '  var error = 0;' . "\n" .
             '  var error_message = "' . JS_ERROR . '";' . "\n" .
             '  var payment_value = null;' . "\n" .
             '  if (document.checkout_payment.payment.length) {' . "\n" .
             '    for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" .
             '      if (document.checkout_payment.payment[i].checked) {' . "\n" .
             '        payment_value = document.checkout_payment.payment[i].value;' . "\n" .
             '      }' . "\n" .
             '    }' . "\n" .
             '  } else if (document.checkout_payment.payment.checked) {' . "\n" .
             '    payment_value = document.checkout_payment.payment.value;' . "\n" .
             '  } else if (document.checkout_payment.payment.value) {' . "\n" .
             '    payment_value = document.checkout_payment.payment.value;' . "\n" .
             '  }' . "\n\n";

 

and the above code is under "function javascript_validation() {"

 

Also the other error message is:

 

There has been an error processing your credit card

Please try again and if problems persist, please try another payment method.

 

I've also try this post http://forums.oscommerce.com/topic/293045-authorize-net-aim-1-0-on-godaddy/ because i am using Godaddy as hosting server.

 

Can any one help please?!! Thank you!

Share this post


Link to post
Share on other sites

Hi,

 

I have the same problem as yours. I use fast easy checkout module and had the same error message appeared. I tried the post you used http://forums.oscommerce.com/topic/199381-contribution-authorize-net-aim-module/page__st__200__p__885888entry885888 but it doesn't work for me. The error message is still there. I enter the right credit card info and ignore the error message and click "continue" button on the checkout_confirmation.php page and the payment did went through. However I still need to solve the error message otherwise it'll mis-lead customers. Any other solution?

 

Thank you very much!!

 

Found the answer to the error issue "The first four digits of the number entered are: If that number is correct, we do not accept that type of credit card. If it is wrong, please try again." I'm entering the basic 4111111111111111 test acount code. Here is the fix I tried which worked: http://forums.oscommerce.com/index.php?s=&...st&p=885888

 

This resolved the error issue when trying to submit the payment. No longer is the error generated, now all seems to be working properly, with transaction going all the way through admin and receiving approval emails from A.net.

Share this post


Link to post
Share on other sites

We are having a problem. Just started on the 5th. Zero changes made to osCommerce in the last couple months but all of a sudden multiple transactions are failing. Weird thing is, Authorize.net doesn't even show an attempt. It's like there's a connection problem and the attempt times out. The error message the customer gets reads:

 

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

 

No error code, so I'm having difficulties trouble-shooting. Any suggestions would be appreciated...

 

-Kevin

Edited by kru

Add-Ons personally installed:

Step by Step Manual Order -- Request Reviews -- Reviews in Product Listing -- Reviews in Product Display -- Review Approval System -- Leverage Browser Cache --
Header Tag Controller -- Multilayer SEO Pop Out Menu -- Follow Us Box -- View All Products -- USPS Shipping Labels -- UPS Shipping Labels -- Monthly Sales/Tax Report --
htacess Optimisation -- Remove Unused Images -- Master Password -- Admin Change Customer Password -- Database Backup Manager -- Zero Stock Report --
Searchbox Search In Descriptions -- Easy Populate 2.76i -- Barcode Rendering -- Admin Sort By Model -- Products Purchased Report

Add-Ons personally developed:

Search for email address, etc in Orders -- Discontinue Product

Add-Ons installed by others:

View Counter -- Site Monitor -- Image Thumbnailer -- Database Optimizer -- Recaptcha -- Discount Coupons -- Add More Fields

Share this post


Link to post
Share on other sites

I'm using FEC (fast easy checkout with purchase without account) which integrates the checkout_payment.php into checkout_shipping.php page. Here is the step of checkout process:

 

1. While procesing checkout, customer is brought to create_account.php to fill out both billing and shipping address on one page.

 

2. After clicling "continue" button, customer is brought to the checkout_shipping.php page and is asked to enter the credit card information and select the shipping method.

 

3. After clicking "continue" button, customer is brought to checkout_confirmation.php page for final confirmation if all the info is correct.

 

My problem is at the step 2. After entering credit card info, I was brought to checkout_payment.php page and always get this error message:

 

The first four digits of the number entered are: . If that number is correct, we do not accept that type of credit card. If it is wrong, please try again.

 

The four digits number were not displayed and why does the system still give error message even the credit card info is correct? Can anyone help please?? Thank you!!

Share this post


Link to post
Share on other sites

I'm using FEC (fast easy checkout with purchase without account) which integrates the checkout_payment.php into checkout_shipping.php page. Here is the step of checkout process:

 

1. While procesing checkout, customer is brought to create_account.php to fill out both billing and shipping address on one page.

 

2. After clicling "continue" button, customer is brought to the checkout_shipping.php page and is asked to enter the credit card information and select the shipping method.

 

3. After clicking "continue" button, customer is brought to checkout_confirmation.php page for final confirmation if all the info is correct.

 

My problem is at the step 2. After entering credit card info, I was brought to checkout_payment.php page and always get this error message:

 

The first four digits of the number entered are: . If that number is correct, we do not accept that type of credit card. If it is wrong, please try again.

 

The four digits number were not displayed and why does the system still give error message even the credit card info is correct? Can anyone help please?? Thank you!!

 

I'm having a very similar issue. It was just reported to me yesterday by a customer and yet again today. The error was showing in the URL bar as the first 4 digits entered are %3 which I didn't know was what was littering being passed to Authorize.net until I talked to one of their reps. I've had this module installed since September with 0 issues. I also have this one installed rather than the one by Harald because I couldn't get his to not give me an error no matter what I did. If anyone has any idea on where to start looking it would be greatly appreciated.

Share this post


Link to post
Share on other sites

FYI: New requirements by MasterCard and Discover for debit, prepaid and gift cards will be enforced by Authorize.net effective June 30, 2011.

 

Dear Authorize.Net Merchant:

 

MasterCard and Discover are modifying their rules concerning the processing

of debit, prepaid and gift cards. THIS E-MAIL INCLUDES IMPORTANT

INFORMATION ABOUT THE NEW REQUIREMENTS AND THE TIMELINES REGARDING

AUTHORIZE.NET'S SUPPORT OF THE REQUIREMENTS, SO PLEASE READ IT THOROUGHLY.

 

MasterCard's rule changes go into effect May 1, 2010, and Discover's rule

changes go into effect April 16, 2010. However, Authorize.Net, MasterCard

and Discover have worked together to extend these dates for all merchants

using Authorize.Net solutions. OUR MERCHANTS WILL NOW HAVE UNTIL JUNE 30,

2011, TO IMPLEMENT SUPPORT FOR THE REQUIREMENTS WITHIN THEIR SYSTEMS.

 

What are the requirements?

MasterCard and Discover are requiring that all merchants support the

following:

- Balance response transactions - For prepaid and gift cards, once the card

has been used, the remaining account balance will be transmitted along with

the authorization response. The remaining balance must be printed on the

customer receipt, displayed on the Web page or point-of-sale terminal, or

both.

- Partial authorization transactions - When a customer's transaction amount

exceeds the balance available on their debit, prepaid or gift card, instead

of declining the transaction, a partial authorization for the amount

available to the customer will be returned. This will allow the customer to

pay for the remaining amount with another form of payment. This is called a

split-tender transaction.

- Authorization reversals - An authorization reversal is a real-time

transaction initiated when the customer decides that they do not want to

proceed with the transaction, or if the merchant cannot complete the

transaction for any reason. Authorization reversals free up the customer's

available balance on their debit, prepaid or gift card.

 

What steps is Authorize.Net taking to support these requirements?

Authorize.Net will be updating our systems over the coming months to

support the requirements, but will be dependent on each processor's

readiness. For a table of when we anticipate we will support the

requirements with each processor, please visit

http://www.authorize.net/support/pafaqs/#when.

 

What do I need to do to support the requirements?

The steps that you will need to take to support the requirements depend on

how you connect to the payment gateway. For example, if you connect using a

shopping cart, point-of-sale device, or other solution, you will need to

contact your solution provider to confirm that they will be supporting the

requirements. If you connect using a direct integration, you should contact

your Web developer for assistance. Please direct your Web developer to

http://www.authorize.net/support/pafaqs/#do for information on the changes

they will need to make.

 

Do I have to support the requirements?

MasterCard and Discover are requiring all merchants to support the

requirements with the exception of merchants that exclusively process

transactions via batch uploads, mail order/telephone order (MOTO), or

recurring payment transactions. Your Merchant Service Provider (MSP) is

ultimately responsible for determining if the requirements apply to your

business, so please contact them for assistance in determining if your

company is exempt.

 

Once again, these requirements will not be enforced for Authorize.Net

merchants until June 30, 2011. However, we wanted to bring them to your

attention now so that you have plenty of time to plan for their

implementation.

 

For more information on the requirements, including how they affect our

value-adding services, please visit our FAQ page at

http://www.authorize.net/support/pafaqs/.

 

Thank you for your attention to these important changes and for being an

Authorize.Net merchant.

 

Sincerely,

Authorize.Net

Share this post


Link to post
Share on other sites

-To Vger-

 

First of all, thank you very much for such a nice contribution.

I've had a lot of trouble with the Cerified AIM, but now I can rest.

 

Vger, I have just one question and if you can fix it, I'll really appreciate it.

 

Do you know how to inplement x_duplicate_window in your coding?

When I try to purchase any item with same credit card within 2 minutes, the transaction doesn't go through.

I just have to wait more than 2 minutes, and it goes through.

 

Ever since there is no way to change such option at Authorize.net, I guess I have to edit some codes.

Unfortunately, I'm not very good at PHP.

 

Would you able to instruct me?

 

Best regards,

Share this post


Link to post
Share on other sites

FYI: New requirements by MasterCard and Discover for debit, prepaid and gift cards will be enforced by Authorize.net effective June 30, 2011.

 

 

 

I don't think people understand the gravity of this situation. I sure hope an update comes out soon! I hate being unable to solve this problem myself and forced to rely on others.


plasma.jpg

Share this post


Link to post
Share on other sites

yeah, our store got one of these notices from authorize.net april 21st. this could seriously impact our sales if it is not fixed in time, although i just don't know to what extent it would affect us.

 

is there any development effort to bring this contrib into compliance with this recent change in authorize.net / credit card company policies? i would really appreciate some knowledge of which way the ship is headed here.

 

thanks for all the code, vger.

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  

×