Authorize.Net Accept.JS - suspecious AVS transations - verify vs pending

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
2 years 3 months ago #343643

-- HikaShop version -- : 4.6.0
-- Joomla version -- : 3.10.10
-- PHP version -- : 7.4.30
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : None

In the old Authorize.net plugin, if the AVS threshold was reached in Authorize.Net's merchant control panel, the order in HikaShop was sent to pending. This was with Instant Capture turned on. This allowed the store owner time to review and release or cancel as needed.

However with Accept.JS, it is set to verified regardless of when instant capture is on.

The store owner has asked if that same behavior could be in Accept.JS, per the store owner's request.

May be it has to do with how Accept.JS handles the status code returned by Authorize.net?

I've updated the to 1.0.4 (was on 1.0.2), so not sure if this was addressed in that update since I cannot find a changelog for the plugin.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 3 months ago #343651

Hello,

The support of pending transactions has been implemented in the plugin one year ago (with support of shipping address in the transaction object and the authorize/capture mode).
It's available in the 1.0.4 release that you have downloaded.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
2 years 2 months ago #344744

Does Accept.JS 1.0.4 work with PHP 8.1?

I got an error after upgrading the site to run under 8.1 on the final step of check out where I get a 404 and error:

error - Uncaught Throwable of type ParseError thrown with message "syntax error, unexpected token "readonly"". Stack trace: #0

It was working fine under PHP 7.4 before, but this is also part of an upgrade to Joomla 4.2.

PayPal standard payment plugin works fine.

Last edit: 2 years 2 months ago by jazzmang.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 months ago #344747

Hello,

It looks like the current Authorize PHP SDK is not fully compatible with PHP 8.1.
They have various open issues for that.
github.com/AuthorizeNet/sdk-php

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
2 years 2 months ago #344787

Intresting.

I rolled back PHP 8.0 and now get a 500 system error:

Warning: foreach() argument must be of type array|object, null given in /plugins/hikashoppayment/authorizejs/lib/net/authorize/util/ANetSensitiveFields.php on line 60

The normal authorize.net payment plugin (AIM) works (using it as a temporary solution)

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 months ago #344801

Hello,

Thank you for your feedback.
We'll see to update the lib and the dependencies in order to check the PHP 8 (and 8.1) compatibility.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1
  • Hikashop Business
2 years 3 weeks ago #346079

Hello,

I am checking to see if Authorize.Net Accept.JS has been updated to work with PHP 8.0? Found out when we moved from PHP 7.4 that ends security support on November 28th 2022 that we were unable to take credit cards because of the 500 Internal Server Error. That is what the customer said he had and also checked that we did not have any payments through Authorize.net when we normally have several in a day.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 3 weeks ago #346109

Hello,

We do have a plugin with the latest version of the SDK (which should be compatible with PHP 8.0 but it might have still issues with version 8.1 regarding the official Github repository).
We made some tests in a local website and we didn't see major issue but it still requires further tests.

We could be able to provide a beta version of the plugin in order to have feedback on that new SDK.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1
  • Hikashop Business
2 years 3 weeks ago #346146

Okay, how would I go about getting the beta of the new version of the plugin to try out on php 8.0?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 3 weeks ago #346163

Hello,

Please use the contact us form :
www.hikashop.com/support/contact-us.html

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 1
2 years 3 weeks ago #346164

I suspect the issue with the ReadOnly token is that in PHP 8.1, ReadOnly is a reserved term, you can't name objects readOnly anymore. I'm seeing the same behavior in the Authorize.net JS payment plugin. Unfortunately, I have other code in my site that isn't compatible with PHP 8.0, so, I seem to be stuck. May I contact you regarding the Beta as well?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 3 weeks ago #346176

Hello,

The PHP 8.1 issue reported in their Github is related to a "jsonSerialize".
It looks like more a warning than a fatal error.
So it's possible to perform a test with your env ; you can always roolback to the previous version using the official zip.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 1
2 years 2 weeks ago #346219

ReadOnly being a reserved word in Php 8.1 causes the page to throw a compilation error (there is apparently an exception in 8.1 which allows the term to still be used as Function Name, but not as a Constant).

A ) GitHub listed a modification (changing the constant to "ReadOnlyProperty") which is included in the most recent fileset. I downloaded the current fileset and swapped it for that in the existing plugin code and that error went away.

B ) There were still numerous deprecated warnings regarding Serialize and Unserialize. These were easily tracked down, modifying those classes by changing method names from serialize to __serialize and unserialize to __unserialize, then removing the "implements Serialize" and "implements Unserialize" from the class declarations.

C ) XmlDriver and YamlDriver both had methods which did not match the formats of their class "Extending" method declarations, so removing the "string" clarification for last input variable made them match.

D ) There was an errors in /plugins/hikashoppayment/authorizejs/lib/net/authorize/util/ANetSensitiveFields.php where null values were being supplied to foreach statements, which I patched by changing

foreach($sensitiveTags as $sensitiveTag)
to
foreach($sensitiveTags ?? [] as $sensitiveTag)

Which I believe is a backward incompatible fix using PHP 8.1 . I don't think most of the changes I made are backward compatible, but it seems to be stable using Php 8.1 now.

Last edit: 2 years 2 weeks ago by MonkeyT12.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 weeks ago #346220

Hello,

"Null coalescing" (the "??" operator) has been introduced in PHP 7.0.
So you can consider the modification backward compatible :)
PHP 5.6 is not more supported for some time now.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: MonkeyT12

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
2 years 2 weeks ago #346248

I'm also interested in testing this out and sent an email.

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
2 years 2 weeks ago #346273

MonkeyT12 - were your changes to the current production or beta?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 2 weeks ago #346283

Hello,

MonkeyT12 made the modifications directly in the lib of the current plugin.
The beta plugin is based on the latest version of the Authorize SDK (2.0.2) and some parts are very different.
Since the SDK migrates from the version 1 to 2 ; there are major changes.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
2 years 2 weeks ago #346286

Thanks. I just tried a beta couple of different ways with PHP 8.0, and so far, so good.

I'll monitor it over the weekend to see how it goes.

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1
  • Hikashop Business
2 years 2 weeks ago #346290

I sent in a message. Would have done so sooner, but its been a crazy few days.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 1
2 years 2 weeks ago #346291

MonkeyT12 made the modifications directly in the lib of the current plugin.


Correct. Its XML file identifies it as version 1.0.4, it was purchased and downloaded on Oct 21, 2022.

I downloaded the files for schmittjoh/serializer from GitHub: github.com/schmittjoh/serializer on Nov 1.

Please Log in or Create an account to join the conversation.

Time to create page: 0.115 seconds
Powered by Kunena Forum