Page 1 of 1

Authorize.Net AIM module Orders/Products/Cart2

Posted: Thu Mar 20, 2014 11:14 pm
by jhalder
In trying to get this module to work, I have gotten the impression that it is not used by many people as it really does not work with the current versions of CalGuy's Ecommerce modules.

The first hurdle was that the current Orders module removed the Payment template. I was able to add that in and add a version of the template from an older system.

The next hurdle was that I was developing on a system where I was unable to use SSL. I am considering adding an option to the admin of the AIM module that would disable the need for the SSL if you are in testing mode and only allow test CC numbers to be sent to the gateway so that no one would inadvertently send real credit card numbers over an unsecure connection. For the time being I just disabled the SSL check until I am ready to move this to a live environment.

I noticed then that the credit card checking algorithm was very primitive. There was a luhn's checking function in the orders helper class, which had a bug (the function was passed the variable $str, but was trying to check based on the $number variable so it always returned false initially). I fixed that bug and updated the action.payments.php file to use the is_creditcard_number function from the orders helper class.

Now I have the problem that when a card is declined, somehow the orders module still thinks that the order was successful and deletes the cart, enters the order, and gives a successful order message to the client.

I would like to not erase the cart in this instance and return them to the credit card form to try to re-enter their credit card information. The trick is that it seems like this logic is not at all even considered in the Orders gateway complete action.

My thought here is to:
1. Add an ORDERSTATUS_DECLINED constant to the orders module
2. Add the logic I want in the action.gateway_complete.php file
3. Move the $cart_module->EraseCart('gateway-complete'); line and perhaps the encrypted_store::erase($cname) and $keyname to the status cases where that makes sense. (Not my declined card situation).

Although I am open to doing this other ways if it makes more sense. Is anyone else using this module or working on it?

Re: Authorize.Net AIM module Orders/Products/Cart2

Posted: Sat Mar 29, 2014 9:29 am
by guywilson
Hello, how did you get on with this? I was looking at using Authorize.net with Barclays Merchant Services to use with my existing CMSMS site that currently uses Paypal and was wondering if you got it to work? Or had found any other solutions?

Thanks

Re: Authorize.Net AIM module Orders/Products/Cart2

Posted: Sun Mar 30, 2014 7:34 pm
by Dr.CSS
Part of your problem is that you are hacking PHP files in the Order module, the payment gateway is set in one of the e-com modules so you may want to reinstall them then set Authorize.net as the payment gateway...

Hacking PHP files is the quickest way to not get help...