Post by smwoodcrafts » Mon Nov 05, 2018 2:52 am

Hi,
I'm trying to set up my square payment API and have run into a bit of an issue. I have an SSL and SSL is turned on in the System-->Settings-->Server tab. When I start to set up the Square API, the Square OAuth Redirect URL in the payments extension is not HTTPS as is required. Why is this not coming up as secure? The extension in opencart also says "Make sure you have SSL enabled on your checkout page. Otherwise, the extension will not work." Is there another place I have to turn on SSL?

User avatar
New member

Posts

Joined
Fri Sep 28, 2018 4:00 am

Post by straightlight » Mon Nov 05, 2018 4:34 am

No OC version posted. Forum rules. However, ensure your .htaccess , config.php and admin/config.php files are properly configured.

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 smwoodcrafts » Mon Nov 05, 2018 5:45 am

Sorry, I made sure it was in the 1.5+ forum but I'm using 1.5.6.5_rc. I was aware of the config.php files, what do I need to change in my .htaccess file?

User avatar
New member

Posts

Joined
Fri Sep 28, 2018 4:00 am

Post by smwoodcrafts » Tue Nov 06, 2018 8:05 am

I've tried looking everywhere and can't find a solution. I am running OC1.5.6.5_rc and installed Square 1.1.2 extension for 1.5. I followed the instructions on turning on the SSL and edited the 2 config files. There is no mention of editing the .htaccess file, but I can't get the Square OAuth Redirect URL to read as HTTPS.
Can someone please help me?

User avatar
New member

Posts

Joined
Fri Sep 28, 2018 4:00 am

Post by smwoodcrafts » Wed Nov 07, 2018 3:24 pm

Looks like no one knows the answer to this or no one is reading. If I ever find an answer, I'll be sure to post it.

User avatar
New member

Posts

Joined
Fri Sep 28, 2018 4:00 am

Post by ADD Creative » Thu Nov 08, 2018 1:35 am

The SSL setting in System-->Settings-->Server tab is the only place. However make sure that HTTPS_SERVER and HTTPS_CATALOG start with https:// in your config.php and admin/config.php.

It's recommended nowadays to make the whole site secure by changing HTTP_SERVER and HTTP_CATALOG to start with https:// and adding redirects in your .htaccess. Doing this may help with your issue.

As the Square payment module is not included with 1.5.x, you may be better to contact the extension's author for support.

www.add-creative.co.uk


Expert Member

Posts

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

Post by smwoodcrafts » Thu Nov 08, 2018 1:50 am

Thanks, I'm not exactly sure what to put in the .htaccess file. I've seen so many versions of the code to put in and am very confused. Can you point me in the right direction on what to put in the .htaccess file?

User avatar
New member

Posts

Joined
Fri Sep 28, 2018 4:00 am

Post by smwoodcrafts » Thu Nov 08, 2018 4:53 am

I did contact iSenselabs to ask about this and they helped me get it working. Everything you need to know, almost is in the link they gave me.
https://isenselabs.com/posts/opencart-pages-https
This worked to make all the pages ssl, but it didn't change the Square OAuth Redirect URL to read https. I had to do what ADD Creative suggested and make all the links in both config files https. After that, it was a piece of cake.
Although, never had to set up a CRON job before so the official instruction video could have showed that as well.

Dan

User avatar
New member

Posts

Joined
Fri Sep 28, 2018 4:00 am

Post by ADD Creative » Thu Nov 08, 2018 5:55 am

Sounds like a bug in their payment module or an extra step they have not told you about, if it's the only lnik that didn't use https.

As for .htaccess. To redirect http to https try the following.

Code: Select all

RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
If you then want to redirect example.com to www.example.com.

Code: Select all

RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [E=HTTPS,R=301,L]
Or www.example.com to example.com.

Code: Select all

RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [E=HTTPS,R=301,L]

www.add-creative.co.uk


Expert Member

Posts

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

Users browsing this forum: No registered users and 22 guests