Post by rocketfoot » Fri Nov 04, 2022 1:53 am

I am trying to get the Paypal Commerce Platform that is included with v3.0.3.8, to work but I keep getting this error even after Paypal says I am connected and ready to accept payments!

Code: Select all

 Authentication failed due to invalid authentication credentials or a missing Authorization header.
I am on a fresh 3.0.3.8 install

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by by mona » Fri Nov 04, 2022 2:51 am


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by straightlight » Fri Nov 04, 2022 3:11 am

rocketfoot wrote:
Fri Nov 04, 2022 1:53 am
I am trying to get the Paypal Commerce Platform that is included with v3.0.3.8, to work but I keep getting this error even after Paypal says I am connected and ready to accept payments!

Code: Select all

 Authentication failed due to invalid authentication credentials or a missing Authorization header.
I am on a fresh 3.0.3.8 install
Yet, the signature still shows as 1.5.6 as we speak.

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 rocketfoot » Fri Nov 04, 2022 3:34 am

I have indeed and I have updated the extension as all the posts suggest but I still get the error every time I try to connect!

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by ADD Creative » Fri Nov 04, 2022 4:22 pm

Switch on the debug logging if it allows you to. Disconnect and try to reconnect. Then check both the OpenCart and PHP error logs. Also check your web browser's developer console for messages.

www.add-creative.co.uk


Expert Member

Posts

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

Post by by mona » Fri Nov 04, 2022 11:45 pm

as above

Since a previous post was looking for a payment solution - that may make this issue irrelevant.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by rocketfoot » Sat Nov 05, 2022 12:31 am

by mona wrote:
Fri Nov 04, 2022 11:45 pm
as above

Since a previous post was looking for a payment solution - that may make this issue irrelevant.
No, I need to get Paypal working and I need an Offline Credit Card extension...

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by by mona » Sat Nov 05, 2022 12:56 am

You need to debug it as ADD Creative has written above

You will probably need to upgrade it (or use something else) as many issues reported but you can try :
https://www.opencart.com/index.php?rout ... n_id=38358
https://github.com/Dreamvention/paypal/releases
https://www.opencart.com/index.php?rout ... 20commerce

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by vivienneanthony » Thu Mar 23, 2023 7:02 am

Have anyone had luck fixing the problem or knowing what's wrong? I am running Opencart 3.02 and running the latest ocmod extension. I am getting a authorization problem also.

New member

Posts

Joined
Tue Oct 15, 2019 6:23 am

Post by by mona » Thu Mar 23, 2023 7:31 am

ADD Creative wrote:
Fri Nov 04, 2022 4:22 pm
Switch on the debug logging if it allows you to. Disconnect and try to reconnect. Then check both the OpenCart and PHP error logs. Also check your web browser's developer console for messages.
by mona wrote:
Sat Nov 05, 2022 12:56 am
You need to debug it as ADD Creative has written above

You will probably need to upgrade it (or use something else) as many issues reported but you can try :
https://www.opencart.com/index.php?rout ... n_id=38358
https://github.com/Dreamvention/paypal/releases
https://www.opencart.com/index.php?rout ... 20commerce
In addition presuming you mean the latest by Dreamvention, you could contact them.
Note there is no Opencart 3.02, they will need the correct OC version (in all four digits) and the exact Paypal ocmod version (in whatever format that is).

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by vivienneanthony » Thu Mar 23, 2023 10:06 am

by mona wrote:
Sat Nov 05, 2022 12:56 am
You need to debug it as ADD Creative has written above

You will probably need to upgrade it (or use something else) as many issues reported but you can try :
https://www.opencart.com/index.php?rout ... n_id=38358
https://github.com/Dreamvention/paypal/releases
https://www.opencart.com/index.php?rout ... 20commerce
In addition presuming you mean the latest by Dreamvention, you could contact them.
Note there is no Opencart 3.02, they will need the correct OC version (in all four digits) and the exact Paypal ocmod version (in whatever format that is).
[/quote]


Nods. I am checking on enabling logs. I use 1and1 so getting the php logs is not that easy. I did not know about Dreamvention version but I checked it out. Oddly. It connects to Paypal but it still throws the authorization and header error after. The extension enables but I can't do anything with it. So, something is wrong.

New member

Posts

Joined
Tue Oct 15, 2019 6:23 am

Post by vivienneanthony » Fri Mar 24, 2023 3:24 am

Hello

The hosting company had me add a code to .htaccess which worked partially. Logging into the admin and extension. It shown connected using 1.50. I further attempted to disconnect and reconnect to make sure it works. It failed again with the same error repeatedly. Could it be a server .htaccess file issue? I tried changing the code below.

Vivienne

// Code from hosting company
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


As

Code: Select all


# SEO URL Settings
RewriteEngine On


# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


#RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

#force ssl
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.thehofshop.com [NC]
RewriteRule ^(.*)$ http://thehofshop.com/$1 [L,R=301]

New member

Posts

Joined
Tue Oct 15, 2019 6:23 am

Post by labeshops » Fri Mar 24, 2023 4:19 am

Are you running a firewall on your server? If so, make sure you whitelist the paypal ips. I am running the paypal commerce manager on opencart 3.0.3.2 as well without issue, so my guess is it is something in your configuration.

Also make sure your email settings are correct under settings on your store. If opencart cannot trigger the confirmation email, it gives you some weird access errors. I had this happen when I forgot to update my smtp password in opencart after I changed it.

Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by Johnathan » Fri Mar 24, 2023 4:48 am

If you can't get it working, I just released a commercial PayPal extension because so many people have been having issues with the free one:

PayPal Payment Gateway

It works a bit different than the free one, so it may work fine for you without having to mess with htaccess. I'm also always around for support if you need help with the extension:

www.getclearthinking.com/contact

If you'd rather get the free one working then I understand, but I thought I'd mention it.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by vivienneanthony » Fri Mar 24, 2023 7:49 am

labeshops wrote:
Fri Mar 24, 2023 4:19 am
Are you running a firewall on your server? If so, make sure you whitelist the paypal ips. I am running the paypal commerce manager on opencart 3.0.3.2 as well without issue, so my guess is it is something in your configuration.

Also make sure your email settings are correct under settings on your store. If opencart cannot trigger the confirmation email, it gives you some weird access errors. I had this happen when I forgot to update my smtp password in opencart after I changed it.
I always had the general email setup under the store email window then on the mail email window. The email is set to mail and everything else blank. I previously received emails from the store and currently do. So, I do not think that's the issue. The hosting company did a server refresh. So I am going check again in the morning.

Correction
I went back and configured the smtp mail settings and store settings.
Last edited by vivienneanthony on Fri Mar 24, 2023 8:07 am, edited 1 time in total.

New member

Posts

Joined
Tue Oct 15, 2019 6:23 am

Post by vivienneanthony » Fri Mar 24, 2023 7:49 am

Johnathan wrote:
Fri Mar 24, 2023 4:48 am
If you can't get it working, I just released a commercial PayPal extension because so many people have been having issues with the free one:

PayPal Payment Gateway

It works a bit different than the free one, so it may work fine for you without having to mess with htaccess. I'm also always around for support if you need help with the extension:

www.getclearthinking.com/contact

If you'd rather get the free one working then I understand, but I thought I'd mention it.
No problem. I'll keep that in mind.

New member

Posts

Joined
Tue Oct 15, 2019 6:23 am

Post by vivienneanthony » Sun Mar 26, 2023 2:39 am

Quick question. I managed to get it to work I think. The first set of code worked to fully connect to Paypal on the first try. It's the very first thing I put in the .htaccess file after the turning on the rewrite engine. My thoughts were the authorization information was not being passed in the proper HTTP format. That worked. Afterward I commented out.

I modified the original .httaccess code again to add the authorization code. I think. The issue is I am not sure about because I am new to the .htaccess rewrite that have the proper code. It's close to the original code that worked minus

Code: Select all

 RewriteRule ^index\.php$ - [L]
. The website is running and in the extension admin. It shows Paypal is connected

Any thoughts appreciated..

Code: Select all

## <IfModule mod_rewrite.c>
## RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
## RewriteBase /
## RewriteRule ^index\.php$ - [L]
## RewriteCond %{REQUEST_FILENAME} !-f
## RewriteCond %{REQUEST_FILENAME} !-d
## RewriteRule . index.php?_route_=$1 [L]
## </IfModule>


# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [QSA,L]

New member

Posts

Joined
Tue Oct 15, 2019 6:23 am

Post by vivienneanthony » Mon Mar 27, 2023 8:23 am

I think I'm narrowing down the problems. I have not gotten the http authorization to pass fully with the following code. Maybe someone sees a problem. I had to turn off caching on the admin dashboard to at least get some connection. It still require a force refresh. So, it seems to be a issue with caching and possibly the header. I'm testing it using the sandbox settings.

Code: Select all

# SEO URL Settings
RewriteEngine On

# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteRule ^index\.php$ -
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [QSA,L]

## force ssl
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

## RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.thehofshop.com [NC]
RewriteRule ^(.*)$ http://thehofshop.com/$1 [L,R=301]


### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

# Added Security
Header set X-Content-Type-Options "nosniff"
Header set X-XSS-Protection "1; mode=block"
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate

New member

Posts

Joined
Tue Oct 15, 2019 6:23 am

Post by ADD Creative » Mon Mar 27, 2023 7:44 pm

vivienneanthony wrote:
Mon Mar 27, 2023 8:23 am
I think I'm narrowing down the problems. I have not gotten the http authorization to pass fully with the following code. Maybe someone sees a problem. I had to turn off caching on the admin dashboard to at least get some connection. It still require a force refresh. So, it seems to be a issue with caching and possibly the header. I'm testing it using the sandbox settings.
You could rule out a browser caching problem by using your web browser's developer tool and select 'Disable cache'. You could also check for any browser warnings and errors.

If it is a cache control problem see the post below on how to set correctly for only the PHP responses.
viewtopic.php?p=853532#p853532

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 91 guests