Browser Content Security Policy Issue

pritamupwork
Contributor
Contributor

I am integrating the paypal payment system in python Django environment. Now, as per the basic guidelines, the payment is created as follows,

 

payment = Payment({

"intent": "sale",

#Set payment method

"payer": {

"payment_method": "paypal"

},

# Set redirect URLs

"redirect_urls":

{

"return_url": "http://localhost:3000/process",

"cancel_url": "http://localhost:3000/cancel"

},

# Set transaction object

"transactions": [

{ "amount":

{ "total": "10.00",

"currency": "USD" },

"description": "payment description"

}]

})

 

if payment.create():
for link in payment.links:
if link.method == "REDIRECT":
redirect_url = (link.href)
return redirect_url
return False
else:
print(payment.error)
return False

 

Now, it generates a redirect url properly. But after going into the url (payment page) I am getting a list of errors in both Google chrome and in Mozilla Firefox. Now the error is related to CSP but that is not in my hand cause the rules are mentioned in the paypal page itself. Is there any way outGoogle ChromeGoogle Chrome for this problem ?

MozillaMozilla.

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.