News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Native Authorize.Net and VM 3.6.2

Started by ssc3, September 27, 2019, 19:54:45 PM

Previous topic - Next topic

ssc3

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.

Virtuemart Payment Plugins
https://plugins.online-store.co.uk

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

ssc3

#2
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.
Virtuemart Payment Plugins
https://plugins.online-store.co.uk

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

GJC Web Design

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;
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

millermulti

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];

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ssc3

Virtuemart Payment Plugins
https://plugins.online-store.co.uk

Milbo

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 !
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rvbgnu

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.
Best Regards, Hervé Boinnard - Irish Time (GMT)
Joomla! multilingual website and online business made easy - https://www.puma-it.ie

3D Secure v1 (3DS1) & Strong Customer Authentication (SCA)! Stripe.com payment plugin for VirtueMart 3: https://www.puma-it.ie/en/joomla-and-virtuemart-extensions/stripe-for-virtuemart
Authipay (AIB Merchant Services) for VirtueMart 2 & 3: https://www.puma-it.ie/en/joomla-and-virtuemart-extensions/authipay-aib-merchant-services-for-virtuemart

rvbgnu

#10
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.
Best Regards, Hervé Boinnard - Irish Time (GMT)
Joomla! multilingual website and online business made easy - https://www.puma-it.ie

3D Secure v1 (3DS1) & Strong Customer Authentication (SCA)! Stripe.com payment plugin for VirtueMart 3: https://www.puma-it.ie/en/joomla-and-virtuemart-extensions/stripe-for-virtuemart
Authipay (AIB Merchant Services) for VirtueMart 2 & 3: https://www.puma-it.ie/en/joomla-and-virtuemart-extensions/authipay-aib-merchant-services-for-virtuemart

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ssc3

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.
Virtuemart Payment Plugins
https://plugins.online-store.co.uk

AH

QuoteApart for language updates, the only major change in this is the bugfix.

There are many changes not just this bugfix
Regards
A

Joomla 3.10.11
php 8.0

ssc3

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.
Virtuemart Payment Plugins
https://plugins.online-store.co.uk