VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: ssc3 on September 27, 2019, 19:54:45 PM

Title: Native Authorize.Net and VM 3.6.2
Post by: ssc3 on September 27, 2019, 19:54:45 PM
Authorize.Net will fail if you upgrade to VM 3.6.2

The merchant will cease trading.

Also effects many third party plugins.

The cause is Revision 10115 - checkAutomaticSelectedPlug, listed methods contained sometimes empty ids.

Making the the orginal code deprecated and using that in place of the new code, might allow time for sites running third party plugins to upgrade.

Title: Re: Native Authorize.Net and VM 3.6.2
Post by: jenkinhill on September 28, 2019, 18:58:07 PM
Rev 10142 included some change in checkAutomaticSelectedPlug  - release version is now 3.6.2.10159  http://dev.virtuemart.net/attachments/download/1198/com_virtuemart.3.6.2.10159_package_or_extract.zip

I have not yet tested it with Authorize
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: ssc3 on September 30, 2019, 10:15:03 AM
The problem also occurs in latest version 3.6.2.10159

Effects both native Authorize.Net and third party payment plugins using a single payment method.

The first indication that the shop owner will have that there is a is a problem is when the orders stop coming in.
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: Milbo on October 02, 2019, 19:18:34 PM
I just reverted it back


foreach ($returnValues as $returnValue) {
if ( isset($returnValue )) {
if(is_array($returnValue)){
foreach($returnValue as $method){
$nb ++;
$method_id[] = $method;
}
} else /*/if($returnValue )*/{
$nb ++;
$method_id[] = $returnValue;
}
}
}


But automatic may not work as expected with the old plugins.

What is the thing behind all that? The old constructions used "NULL" for nothing and 0 if there is one method....

The new way is to send back the method id if it can be used.
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: GJC Web Design on October 04, 2019, 12:01:16 PM
yes .. the plugins that return 0 for plgVmOnCheckAutomaticSelectedPayment() or plgVmOnCheckAutomaticSelectedShipment() are unselectable if used with other plugins or clear their data if used on there own.

the fix if not using the commented version is in the plugin for the functions above return a value --


$return = $this->onCheckAutomaticSelected($cart, $cart_prices);
if (isset($return)) {
return $return[0];
} else {
return NULL;
}
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: millermulti on October 05, 2019, 03:59:49 AM
GJC Web Design. Thank you, thank you. Site was down for a day due to the Authorize.net issue. Your fix worked perfectly. All back up and running. For anyone else looking to apply the fix. You need to edit:

/plugins/vmpayment/authorizenet/authorizenet.php

Scroll to line 1043, update with the content GJC provided: return $return[0];
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: GJC Web Design on October 05, 2019, 11:46:18 AM
nice that is works

can u update us on exactly which version of 3.6.2 you are now on?
Because Max says above he has reverted the change in latest latest

see on the VM config page  --  something like VirtueMart 3.6.2 10159
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: ssc3 on October 06, 2019, 20:32:06 PM
It looks like the changes are in VM 3.6.3

http://dev.virtuemart.net/attachments/download/1201/com_virtuemart.3.6.3.10163_extract.zip

but they are not on general release yet.

Title: Re: Native Authorize.Net and VM 3.6.2
Post by: Milbo on October 08, 2019, 18:52:47 PM
I kept the authorize.net as legacy example. The new code is just

return $this->onCheckAutomaticSelected ($cart, $cart_prices, $paymentCounter);

But we currently work on a new core, which also works with plugins using the old style !
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: rvbgnu on October 10, 2019, 00:19:00 AM
Dear all,

I have the same issue with my Stripe payment plugin. I was going to implement the new features of the core restrictions in a new minor release, but then I found myself in a hurry after 3.6.2. Strange because I've checked and my plugin was already up to date with recommendations from here, using $address = $cart->getST()  (well explained Max, thank you!)
https://docs.virtuemart.net/tutorials/development/240-important-adjustments-for-virtuemart-3-6.html

Thank you very much GJC Web Design for the fix here!!
http://forum.virtuemart.net/index.php?topic=143564.msg507718#msg507718

Now I am testing backward compatibility with VM before 3.6.
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: rvbgnu on October 10, 2019, 00:45:24 AM
Quick follow up:
- the fix for 3.6.2 works (3.6.2 10159)
- for VM 3.4.2, the same fix is good EXCEPT for single payment method available

Should I use a simple workaround, like testing the VM version to apply the fix or not ?

I will sleep on that, and share my findings asap.
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: GJC Web Design on October 10, 2019, 09:11:36 AM
the fix to the plgVmOnCheckAutomaticSelectedPayment() or plgVmOnCheckAutomaticSelectedShipment() functions in old plugins works in all versions

the change that caused the problem in the cart helper has been reverted in 3.6.3.10163 - not sure if max will keep this in 3.6.4
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: ssc3 on October 10, 2019, 10:23:46 AM
Quotecom_virtuemart.3.6.3.10163_extract.zip
    Bundle, Core + AIO can be used live

why not release this as 3.6.4

According to the notes it can be used live, and fixes the most signification of the bugs that are currently breaking shops.

Apart for language updates, the only major change in this is the bugfix.
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: AH on October 10, 2019, 15:16:06 PM
QuoteApart for language updates, the only major change in this is the bugfix.

There are many changes not just this bugfix
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: ssc3 on October 10, 2019, 16:06:33 PM
Quote04/10/2019
01:13 PM com_virtuemart.3.6.3.10163_extract.zip
    Bundle, Core + AIO can be used live Max Milbers

Quote
There are many changes not just this bugfix

If you read the activity link

VM 3.6.3.10163 was released on the 4 October to fix the most important of the bugs in 3.6.2

That should not take too much testing and should be on general release. The notes indicate that it can be used on live sites.
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: AH on October 10, 2019, 17:55:12 PM
QuoteThe notes indicate that it can be used on live sites.

Indicating that it is not a development or testing version and can be used on live sites - should not be taken as suggesting that you deploy it directly to a live site

You should NEVER deploy to a live site in any instance and should only deploy AFTER testing on a test site

Title: Re: Native Authorize.Net and VM 3.6.2
Post by: ssc3 on October 10, 2019, 18:59:54 PM
Quote from: AH on October 10, 2019, 17:55:12 PM
You should NEVER deploy to a live site in any instance and should only deploy AFTER testing on a test site

Excellent advice, though of no help whatsoever if your shop is down.

As posted elsewhere. The majority of Virtuemart users are not experienced web designers.

They are shop owners first and second.

They do not read these forums and they do not have test sites.

They trust the latest stable release from Virtuemart.

Title: Re: Native Authorize.Net and VM 3.6.2
Post by: AH on October 10, 2019, 19:20:31 PM
QuoteExcellent Advice.

I know. 

QuoteThe majority of Virtuemart users are not experienced web designers.

Neither am I.

This has nothing to do with web design - this is everything to do with running an e-commerce business.

They are retailers first and foremost and have chosen to utilise an online channel for part or all of their business.

Failure to understand the demands and requirements of running any channel will result in problems at some stage.



Title: Re: Native Authorize.Net and VM 3.6.2
Post by: ssc3 on October 10, 2019, 20:20:19 PM


but back on topic.

I think the original discussion was, is the download with one bugfix

virtuemart.3.6.3.10163

http://dev.virtuemart.net/attachments/1201/com_virtuemart.3.6.3.10163_extract.zip

better than the stable current download.

Since it only involves one bugfix, is that easier to test

Can it replace the main download and

get peoples sites up and running again as quickly as possible.

see more problems at

http://forum.virtuemart.net/index.php?topic=143643.0
Title: Re: Native Authorize.Net and VM 3.6.2
Post by: rvbgnu on June 15, 2020, 12:02:21 PM
Maybe a side effect here, do you have this issue?
Credit card fields are not displayed with a single payment method and VM OPC
http://forum.virtuemart.net/index.php?topic=145028.msg514720#msg514720