Payment done, money received, but un error 'catched' after 'onApprouve' method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Paypal developpers! I hope you're doing well!
Here is the thing: I am using the Rest IP to accept online payments. I use the following links to create, and capture payments (in PHP):
1. to create:
https://{LIVE}/v2/checkout/orders
2. Once I have the ID of the order, and payment is done, to capture:
https://{LIVE}/v2/checkout/orders/{order ID}/capture
So payment is done, I got the money into my account with no problems BUT, the Inspector Window shows me un error: 'Refused to execute inline event handler because it violates the following Content Secutiry Policy directive: "script-src........". At the same time, in the .JS file that contains the 'createOrder' and 'onApprouve' functions, the 'onApprouve' function returns a very different response that the one is shown in the documentation. I did a 'console.out' of the response of my PHP file (complete order) and I got the information showed in the image.
How should I interpretate all these problems? Is it my PHP that is the problem, or is it my JS file? Is it the 'inline event handler' error that is blocking the rest? I just need to get the result of the order, whether it is 'completed' or not, in order to validate my user's purchased and put him in my database.
Best regards,
Alejandro

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.