Anyone here had experience with PayPal Content Security Policy?
I tried to make a dummy purchase using Chrome Developer tools and this message is written in the bottom box: Content Security Policy blocks inline execution of scripts and stylesheets
(See attachment)
There must be a line of code to go in the <head> lurking somewhere, PayPal doesn't want to make it simple.
So, does anyone have any knowledge of this CSP? It's certainly preventing any PayPal sales that's for sure.
Steve_63
0
Light Poster
Recommended Answers
Jump to PostHello!
What does your Content Security Policy currently look like, and what type of PayPal integration do you have set up? Your CSP might be blocking PayPal's scripts from running or forms from executing.
Here at DaniWeb, we have some pages such as our DaniWeb Premium donation page where …
Jump to PostAs I came across your recent rant about CSP, is it still giving you trouble? Can I provide more assistance?
Jump to PostDid adding the PHP code:
header("content-security-policy: form-action 'self' https://www.paypal.com");
to your PHP page that contains the PayPal button not fix your problem?
CSP is simply an HTTP header that gets spit out from your PHP code (or whatever other programming language you happen to be using). It doesn't really "live" …
All 11 Replies
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Steve_63
commented:
Very helpful, the first person to come up with some kind of explanation and a solution, a big thank you!
+0
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Steve_63
commented:
I've seen my punters (via Ms Clarity) press on the Buy Now buttons and they just don't respond, there's no pointer/hand.
+0
Steve_63
0
Light Poster
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Steve_63
commented:
Only just seen this Dani, I will try it tomorrow (later!) as it's nearly 3am. My sincere thanks to you
+0
Steve_63
0
Light Poster
Steve_63
0
Light Poster
Steve_63
0
Light Poster
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Steve_63
commented:
Besides I'm conversing with a woman and I consider myself a gentleman. I wonder if I could send the html by PM, then you can decide if it's fit.
+0
Steve_63
0
Light Poster
Steve_63
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.