Post by PVACND » Fri Dec 18, 2020 11:06 pm

Hi! My open cart is Version 3.0.3.6. Activated Square extension but in Square settings field Square OAuth Redirect URL I have URL like this - 1index.php?route=extension/payment/squareup/oauth_callback no full address for some reason and Square keeps telling invalid redirect URL. Any idea how can I fix it?
Thanks anyone for help!

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by IP_CAM » Fri Dec 18, 2020 11:53 pm

1index.php?route=
where is that 1 coming from ? ???

I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'300 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by PVACND » Sat Dec 19, 2020 12:00 am

don't know, any idea how is this redirect URL looks like normally?

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by Cue4cheap » Sat Dec 19, 2020 12:23 am

For the OAuth redirect url it should be:

Code: Select all

https://www.yourdomain.com/youradminname/index.php?route=extension/payment/squareup/oauth_callback
AND that field should not be editable. An auto generated field.

Since I do not use the OC3 version AND I thought 3.0.3.6 got rid of the square module completely, did you download that module from the marketplace?
If so what one? And you might need to contact that developer.
Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by PVACND » Sat Dec 19, 2020 12:54 am

Yes I understand it's auto generated link but in some case it's corruption or something it's not showing correctly. Is anybody from Opencart here can help me to solve this problem? Please!

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by Cue4cheap » Sat Dec 19, 2020 1:05 am

PVACND wrote:
Sat Dec 19, 2020 12:54 am
Yes I understand it's auto generated link but in some case it's corruption or something it's not showing correctly. Is anybody from Opencart here can help me to solve this problem? Please!
See the 2nd part of my comment:
"Since I do not use the OC3 version AND I thought 3.0.3.6 got rid of the square module completely, did you download that module from the marketplace?
If so what one? And you might need to contact that developer."

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by PVACND » Sat Dec 19, 2020 1:29 am

No, it's integrated with Opencart same as PayPal and another payment options. I just activated.

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by ADD Creative » Sat Dec 19, 2020 8:04 am

Check HTTP_SERVER and HTTPS_SERVER in both config.php and admin/config.php/.

Do you have any extensions that make changes to the admin or URLs?

Have you checked the file admin/controller/extension/payment/squareup.php has not been modified?

Have any other URLs in your admin in the square page, such as the cancel or breadcrumbs been affected at all?

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by PVACND » Sun Dec 20, 2020 12:39 am

Have you checked the file admin/controller/extension/payment/squareup.php has not been modified?
Have any other URLs in your admin in the square page, such as the cancel or breadcrumbs been affected at all?
Thanks for reply. I checked all configs looks ok. Not sure if something wrong with squareup.php. If I post it it's long. Can I send it to you to look? Or if some one can send me the right file I can compare, but no one touched this file before.

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by ADD Creative » Sun Dec 20, 2020 1:14 am

You can view the original file here.
https://github.com/opencart/opencart/bl ... uareup.php

Line 154 is the code that generates the link. As you can see it uses the same function as all the other links.
https://github.com/opencart/opencart/bl ... p.php#L154

It's then use in the template here.
https://github.com/opencart/opencart/bl ... p.twig#L96

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by PVACND » Sun Dec 20, 2020 1:21 am

If I just replace my file with original you think it's will work? Or it's some individual parameters in this file?

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by ADD Creative » Sun Dec 20, 2020 1:34 am

There should be nothing special in those files, so just replace them with the original versions. Just make a back up first of any thing you replace.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by PVACND » Sun Dec 20, 2020 1:36 am

I did try to replace squareup.php with original, no changes, same problem, looks like problem not in this file :( anything else I can check?

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by PVACND » Sun Dec 20, 2020 1:38 am

i will try to replace twig template file and see if it's help.

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by ADD Creative » Sun Dec 20, 2020 1:39 am

PVACND wrote:
Sun Dec 20, 2020 1:36 am
I did try to replace squareup.php with original, no changes, same problem, looks like problem not in this file :( anything else I can check?
Check the template file as well.
https://github.com/opencart/opencart/bl ... areup.twig

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by PVACND » Sun Dec 20, 2020 2:10 am

I checked and replaced but still the same , generated link looks exactly like this - 1index.php?route=extension/payment/squareup/oauth_callback
What else I can check ? :( Thank you for helping :)

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by Cue4cheap » Sun Dec 20, 2020 3:30 am

PVACND wrote:
Sun Dec 20, 2020 2:10 am
I checked and replaced but still the same , generated link looks exactly like this - 1index.php?route=extension/payment/squareup/oauth_callback
What else I can check ? :( Thank you for helping :)
Might be a sledgehammer way of trying to find and fix it but do a grep for "1index.php" in all your "squareup" files to see if there was a modification to your code that might account for how it go in that way.

Also look in your database "settings" table.
The key is squareup_redirect_uri_static
If it is in there without the leading information i.e. https://www.yourdomain.com/youradminname/
change it in the database and see if the problem goes away.

Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by PVACND » Sun Dec 20, 2020 4:02 am

Thank you very much, I will try after weekend :) will let you know!

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by PVACND » Tue Dec 22, 2020 4:21 am

Hi!
I checked database is it here?- ocss_setting if yes I don't have this key line for some reason. I can see keys for payment_squareup for ID and another settings but nothing for redirect URL.

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am

Post by PVACND » Wed Dec 23, 2020 11:05 pm

Is any body know from where is this URL generating from? Can't find. Please guru help! :)

Newbie

Posts

Joined
Mon Oct 26, 2020 2:59 am
Who is online

Users browsing this forum: No registered users and 5 guests