Loading PayPal Smart Buttons (JS SDK) with Brave Browser throws errors

125 views Asked by At

I'm trying to get a basic PayPal button on my web page, but I can't even load the API without getting errors. I've asked for help on PayPal's own forum, but no one replies.

Here is my page. I'm running in sandbox mode. I've replaced the actual client ID below with [CLIENTID].

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
    <title>PayPal test</title>
</head>

<body>
    <script src="https://www.paypal.com/sdk/js?debug=true&client-id=[CLIENTID]"></script>    
</body>
</html>

I can add a button to the page, and make a purchase, so the buying process works. But it always throws this error at page load. I'm on Win10, Brave Browser (based on Chromium).

js?debug=true&client…ruzpDLhao-FzS6:2659 unhandled_error 
{err: "Error: Invalid json: .↵    at XMLHttpRequest.<anon…[CLIENTID]:2597:55)", timestamp: "1601234382102", referer: "localhost", uid: "9b7c68f416_mtk6mtc6ntq", env: "sandbox"}
env: "sandbox"
err: "Error: Invalid json: .↵    at XMLHttpRequest.<anonymous> (https://www.paypal.com/sdk/js?debug=true&client-id=[CLIENTID]:2597:55)"
referer: "localhost"
timestamp: "1601234382102"
uid: "9b7c68f416_mtk6mtc6ntq"
__proto__: Object

===============================================================

UPDATE

Sorry, I incorrectly wrote I am on Google Chrome. I'm on Brave Browser (based on Chromium). I've tested on Google Chrome and MS Edge, and it works there. Brave is where the errors happen. I've tried to add a new sandbox app, but get the same error. I've used the Brave browser settings to allow my site all privileges, but still the same error.

Live test:

Just loading API: https://www.trainerslab.app/PayPalTest.html

Example from PayPal dev site: https://www.trainerslab.app/PayPalTest2.html

Screenshot:

enter image description here

0

There are 0 answers