Author Topic: Native Authorize.Net and VM 3.6.2  (Read 859 times)

ssc3

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 150
    • Online Store Plugins
Native Authorize.Net and VM 3.6.2
« 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.

Virtuemart Payment Plugins

https://plugins.online-store.co.uk

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27572
  • Always on vacation
    • Jenkin Hill Internet
Re: Native Authorize.Net and VM 3.6.2
« Reply #1 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
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.6.8 10204 on Joomla 3.9.13 PHP 7.0.33

ssc3

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 150
    • Online Store Plugins
Re: Native Authorize.Net and VM 3.6.2
« Reply #2 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.
Virtuemart Payment Plugins

https://plugins.online-store.co.uk

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9973
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Native Authorize.Net and VM 3.6.2
« Reply #3 on: October 02, 2019, 19:18:34 pm »
I just reverted it back

Code: [Select]
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.
I should 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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9196
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Native Authorize.Net and VM 3.6.2
« Reply #4 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 --


Code: [Select]
$return = $this->onCheckAutomaticSelected($cart, $cart_prices);
if (isset($return)) {
return $return[0];
} else {
return NULL;
}
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

millermulti

  • Beginner
  • *
  • Posts: 14
Re: Native Authorize.Net and VM 3.6.2
« Reply #5 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];

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9196
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Native Authorize.Net and VM 3.6.2
« Reply #6 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ssc3

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 150
    • Online Store Plugins
Re: Native Authorize.Net and VM 3.6.2
« Reply #7 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.

Virtuemart Payment Plugins

https://plugins.online-store.co.uk

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9973
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Native Authorize.Net and VM 3.6.2
« Reply #8 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 !
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rvbgnu

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 123
    • Puma-IT.ie
Re: Native Authorize.Net and VM 3.6.2
« Reply #9 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.
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

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 123
    • Puma-IT.ie
Re: Native Authorize.Net and VM 3.6.2
« Reply #10 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.
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9196
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Native Authorize.Net and VM 3.6.2
« Reply #11 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ssc3

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 150
    • Online Store Plugins
Re: Native Authorize.Net and VM 3.6.2
« Reply #12 on: October 10, 2019, 10:23:46 am »
Quote
com_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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3016
  • VirtueMart Version: 3.6.3
Re: Native Authorize.Net and VM 3.6.2
« Reply #13 on: October 10, 2019, 15:16:06 pm »
Quote
Apart for language updates, the only major change in this is the bugfix.

There are many changes not just this bugfix
regards
A

Joomla 3.9.12
php 7.2

ssc3

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 150
    • Online Store Plugins
Re: Native Authorize.Net and VM 3.6.2
« Reply #14 on: October 10, 2019, 16:06:33 pm »
Quote
04/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