VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: mronayne on January 29, 2015, 22:58:48 PM

Title: Update to VirtueMart 3.0.4 - 3.0.6.2 Breaks Authorize.net AIM Payment
Post by: mronayne on January 29, 2015, 22:58:48 PM
I just upgrade to VirtueMart 3.0.4 and now the following message appears at the top of the "Thank you for your Order" page:

Message
Card Number Invalid
Card CVV Number Invalid or Missing
Expiration Date Invalid


This happens even though the Order actually goes through and is accepted by Authorize.net. This was working properly before the update! Help Please!

I used the upgrade feature from within Joomla.
I am running an "out of the box" vanilla version of Joomla 3.3.6 with the prostar template.
Running on  PHP 5.6.3
MySQLi 5.5.40-cll
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment Method
Post by: mronayne on January 30, 2015, 16:57:19 PM
I take this back...
I just eliminated the FlexibleWeb CleanMart template from my test site altogether and this issue still persists. It appears to be an issue with the latest Authorize.net AIM plugin not working properly in Sandbox/Test mode. I have no idea if this issue persists when interacting with the "live" Authorize.net server.

Ignore the below original comment - this issue is still Open!
"After further investigation and debugging I've isolated this issue to the FlexibleWeb CleanMart template and not VirtueMart.
Consider this issue closed in this forum."
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment (was template prob)
Post by: mronayne on February 16, 2015, 16:45:03 PM
Just want to add another note that this issue is NOT Resolved at this time.

Has anyone else seen this after upgrading?
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: mronayne on February 20, 2015, 19:09:30 PM
Has anyone been able to confirm (or deny) that this is an issue with the Authorize.net AIM plugin distributed with VirtueMart?
I've attached a screen-capture of the error message. This error shows even though the transaction was successfully executed against the Authorize.net Sandbox server.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: alatak on February 21, 2015, 16:23:01 PM
hello mronayne
I cannot reproduce your problem.
Everything works ok with a test account.
I am running 3.0.6 and i have tested on J3 and J25.
Can you give me the url?
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: alatak on February 21, 2015, 16:27:10 PM
Hello

Can you try to do a checkout with a admin login ? VM displays errors to admin. May be this will help us to understand what happened.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: mronayne on February 21, 2015, 17:10:55 PM
I sent you a PM with instructions for accessing my site to see this error in action.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: mronayne on February 23, 2015, 23:54:09 PM
Did you ever get my PM and have you had a chance to look into it?
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: alatak on February 26, 2015, 09:47:55 AM
Hello
no i am sorry. I did not receive any PM.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: mronayne on February 26, 2015, 16:23:49 PM
Hmmm, Not sure why? No matter. I am in the process of waiting for the latest updates to 3.0.6 to be available. After I install that update I'll re-test the Authorize.Net AIM plugin again to see if I still receive these erroneous earning messages. I'll update this post once I am certain.

For now, in the version of the authorizenet.php that I have, I replaced the code near line 394:
if (!$this->_validate_creditcard_data(TRUE)) {
return FALSE; // returns string containing errors


With this:


if ($this->_currentMethod->sandbox) {    // MLR added sandbox check to disable this test when in sandbox mode
if (!$this->_validate_creditcard_data(FALSE)) { return FALSE; }
} else {
if (!$this->_validate_creditcard_data(TRUE)) { return FALSE; } // returns string containing errors
}

Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: T.A. Garrison, LLC on February 26, 2015, 19:52:17 PM
I'm using Joomla 3.4.0 with Virtuemart 3.0.6 - and my client has this same problem.
The credit card is accepted, confirmed, and when you arrive at the "Thank You" page you get the error.

I'm going to see if making the change as suggested by mronayne will remedy the issue.

I have the site/Authorize.net in TESTMODE so that I can run as many tests as necessary - http://cameraclear.com/index.php/order

Valerie, if you can, please feel free to run a test on the site.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: T.A. Garrison, LLC on February 26, 2015, 20:23:21 PM
I applied the suggested changes to authorizenet.php and that made no difference.

Valerie?


As you suggested I tried the same test using admin. Following is the result:


Message

Card Number Invalid
Card CVV Number Invalid or Missing
Expiration Date Invalid
×
Error

vmError: Warning extension of the image is a png, tpcdf has problems with that in the header, choose a jpg or gif (will change this, but not a problem)

Notice: Undefined offset: 0 in /home/???/public_html/plugins/vmshipment/istraxx_ups/istraxx_ups.php on line 537
Thank you for your order!
Payment Name    Authorize.netSecure payments through Authorize.net
Order number    6ca3025
Amount    69.81 USD
Transaction ID    0


It seems there is something with the UPS plugin that may be effecting the Authorize.net plugin.

Any thoughts?
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: mronayne on February 26, 2015, 20:48:09 PM
LTCreations,

I am not surprised that my fix does not work for you since my work-around only applies to when you are in "Sandbox" mode.
But, if you don't mind turning off the internal card validation rules you can do the following:

As before, locate this code near line 394

if (!$this->_validate_creditcard_data(TRUE)) {
return FALSE; // returns string containing errors


And simply change the paramater to the call to _validate_creditcard_data to FALSE as in

if (!$this->_validate_creditcard_data(FALSE)) {
return FALSE; // returns string containing errors


While this disables the internal card verification functions, if the card is bad, Authorize.net will still fail giving you their reasons for declining the card. At least this is how I understand that it works.

This might get you by while waiting for a permanent fix?
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: T.A. Garrison, LLC on February 26, 2015, 21:16:35 PM
Thanks, mronayne.

I'll test that theory to see if it works.
I don't mind turning off the rules as long as they still appear "if/when" there really is a validation problem.
Luckily, this client is not in a hurry to get the site ready for users. So I can take the time to get this issue resolved - workaround or updated file structure from Valerie.

I have others that won't put up with the error, so I'll keep them on the J2.5 and VM2.? until there is a resolve.


OOpppsss....that didn't work.
After turning TRUE to FALSE, I was able to go through the process with a legitimate card.
But, when I used a card (a tester I keep handy) that expired 5 years ago, the orders was "also" processed without any errors.

So, turning off the verification...turns off the verification - period. There is nothing to stop a user from purchasing with a clearly expired card.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: mronayne on February 26, 2015, 23:19:53 PM
Are you still in TEST MODE because if test mode is turned on at Authorize.net any card will work...
I suspect you aren't but thought I would ask just the same?
It is also very possible that I don't fully understand the logic behind the local card verification routine but I truly thought is was just a local test to validate things like whether the card number really matches the card type and that the Security code is the correct number of digits depending on the card type. It looked to me like it was a very rudimentary test?
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: digitalbehavior on February 28, 2015, 15:46:42 PM
I am having this problem as well. Any solution that will not let expired credit cards through?

Thank you!
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: T.A. Garrison, LLC on February 28, 2015, 21:23:15 PM
I'm in TestMode - yes.
But I'm using a valid card with all the correct information.

The test comes from authorize.net
They are going to validate the card before accepting the charge.

In sandbox mode, you can use most anything.

TestMode allows you to run the entire process "exactly" as if the site were live. So the cc info is sent for capture to authorize.net and they verify if the card is valid, or if the CVV is valid, date, etc. If anything is not correct, the appropriate response is returned and the sale is not completed.
If everything "is" correct and valid, the sale is completed and you get to the thank you page.

Theoretically, you cannot get to the thank you page in testmode unless everything is validated.
And, there is validation information "before" the final confirmation button is clicked by the user to indicate that all of the cc info has been verified.

So when you get to the thank you page, everything has been captured, authorized, validated and accepted. At that page there "cannot" be any errors...but there are.

In sandbox, you are allowed to use most anything, although they provide 3 or 4 card numbers to use for processing, and "any" CVV will work with any card. So that's not a very good final test process. It's good to assure that everything is functioning, but not good for the final test before allowing users to to the site for final processing.

When I turned the authorizenet.php validation from TRUE to FALSE, the system allowed any card and any information to be input into the cc fields. Nothing was actually validated.

Valerie said on Thursday that she would look into the issue, but I've not seen any activity to indicate she's found a resolve.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: alatak on March 02, 2015, 12:41:16 PM
Hello
I cannot reproduce your problem.
It may be another plugin disturbing authorize. Can you unpublish the payment plugins you are not using, and try again?
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: alatak on March 03, 2015, 19:05:22 PM
Hello

For some reason, on your website, the js file components/com_virtuemart/assets/js/vmcreditcard.js is not loaded.
i tried different checkout configuration on my test site, and i cannot reproduce your problem.
Title: Re: Update to VirtueMart 3.0.4 Breaks Authorize.net AIM Payment
Post by: mronayne on March 04, 2015, 18:48:21 PM
Ok, This one has gotten even stranger... After upgrading to VN 3.0.6.2 with Joomla 3.4.0 and the beez3 template I still see erroneous messages about credit  card validation.
Here is the sequence of events that produce an erroneous credit card error message.

Card Number Invalid
Card CVV Number Invalid or Missing
Card Number Invalid
Card CVV Number Invalid or Missing
Card Number Invalid
Card CVV Number Invalid or Missing
Card Number Invalid
Card CVV Number Invalid or Missing
Title: Re: Update to VirtueMart 3.0.4 - 3.0.6.2 Breaks Authorize.net AIM Payment
Post by: T.A. Garrison, LLC on March 05, 2015, 21:46:15 PM
Valerie,

I have only the 1 payment plugin - authorize.net

If you are directing your post to me about the /vmcreditcard.js not loaded, what would you suggest as an attempt to get it to load?
Title: Re: Update to VirtueMart 3.0.4 - 3.0.6.2 Breaks Authorize.net AIM Payment
Post by: mronayne on March 05, 2015, 23:03:49 PM
Valerie,

I am running as basic a configuration as possible so I cannot figure out what, if anything, is interfering with this?
Visit: http://base2014.cejayengineering.com/index.php and create yourself an account, then follow the steps I've outlined in my previous post. You should see the errors I am seeing.

Regards,
Mike
Title: Re: Update to VirtueMart 3.0.4 - 3.0.6.2 Breaks Authorize.net AIM Payment
Post by: alatak on March 09, 2015, 20:22:36 PM
Hello
If you are not using the OPC option in VM, i found the reason:

in the file components/com_virtuemart/controllers/cart.php line 170
replace

$cart->setShipmentMethod(true, !$html);
$cart->setPaymentMethod(true, !$html);

with

$force = VmConfig::get('oncheckout_opc',true);
$cart->setShipmentMethod($force, !$html);
$cart->setPaymentMethod($force, !$html);