Post by brydekirk » Sat May 07, 2022 9:21 pm

Hi, we have a problem with our Opencart store sometimes not accepting card payments.

The message we get is "Authorization error: 'GENERIC_DECLINE'" and the only thing I can see which may be causing this is a mismatch between Square & Opencart as to the API version. Our Square dashboard shows the API version of our application as 22-04-20 (latest) but the Square extension in Opencart shows Square API Version: 2020-11-18. I have uninstalled and re-installed the Square extension (version 3.3.4) but this makes no difference.

Can anyone tell me how to force Opencart to use the latest version of the API ?

Our Opencart version is 3.0.3.01

Thanks in advance,
Ian

New member

Posts

Joined
Sun Dec 30, 2018 7:26 pm

Post by straightlight » Sat May 07, 2022 9:24 pm

brydekirk wrote:
Sat May 07, 2022 9:21 pm
Hi, we have a problem with our Opencart store sometimes not accepting card payments.

The message we get is "Authorization error: 'GENERIC_DECLINE'" and the only thing I can see which may be causing this is a mismatch between Square & Opencart as to the API version. Our Square dashboard shows the API version of our application as 22-04-20 (latest) but the Square extension in Opencart shows Square API Version: 2020-11-18. I have uninstalled and re-installed the Square extension (version 3.3.4) but this makes no difference.

Can anyone tell me how to force Opencart to use the latest version of the API ?

Our Opencart version is 3.0.3.01

Thanks in advance,
Ian
While this OC version does not exist in opencart.com , I would suggest to look on the Marketplace for an extension supporting the latest API modifications with Square API.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by brydekirk » Sat May 07, 2022 10:34 pm

Sorry, version 3.0.3.1

New member

Posts

Joined
Sun Dec 30, 2018 7:26 pm

Post by brydekirk » Sat May 07, 2022 11:03 pm

Hi Straightlight,

Thanks for your response, but the only Marketplace extension dealing with Square that I can see is "https://www.opencart.com/index.php?rout ... egory_id=3" which is the one I have installed, so I'm afraid I don't understand your recomendation.

I am fairly certain that the last time I upgraded the Square API in my Square Developer Application it automatically updated the API in our Opencart store but that doesn't appear to be the case anymore......

Kind regards,
Ian

New member

Posts

Joined
Sun Dec 30, 2018 7:26 pm

Post by mikeinterserv » Sun May 08, 2022 12:06 am

Check the file in your
admin/controller/extension/payment/squareup.php
against the file attached and go here to check if there are any differences.
https://www.diffchecker.com/diff
Just copy and paste each file into the input areas.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by brydekirk » Sun May 08, 2022 1:25 am

Thanks mikeinterserv,

I have compared the two files and they are VERY different ( 1995 lines - 1380 Removals 1079 lines - 444 Additions).

Is the file you attached more recent than the squareup.php in the downloadable extension (dated 05/01/22) and, can I simply replace the one I have with the one you have sent me ?

Regards,
Ian

New member

Posts

Joined
Sun Dec 30, 2018 7:26 pm

Post by mikeinterserv » Sun May 08, 2022 1:52 am

To be honest I am not that familiar with the square payment extension.
This file fixed a previous problem a while back.

It would do no harm to rename the original file you have and try this one.
If it goes pear shaped you can just revert back to the original file. :-)

I would expect the file you have from the date given ( 5 - 1 - 22 ) should be the latest but that's not how it works here quite often.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by brydekirk » Sun May 08, 2022 2:31 am

OK, thanks, I will let you know if it works..... :)

New member

Posts

Joined
Sun Dec 30, 2018 7:26 pm

Post by brydekirk » Sun May 08, 2022 4:36 am

Thanks mikeinterserv,

Thanks for your suggestion but replacing squareup.php with the version which you sent me didn't make any difference.

I don't understand how the Square extension determines the API version being used and how I can change it......

Kind regards,
Ian

New member

Posts

Joined
Sun Dec 30, 2018 7:26 pm
Who is online

Users browsing this forum: No registered users and 247 guests