admin管理员组

文章数量:1405170

I've tried few approaches to disable Paypal post-robot debug messages on my browser's console but none seemed to work.

The reason these messages can be quite annoying is that they make debugging the browser harder because there is plenty of them, hiding some other console warnings.

The console logs are ing from Paypal checkout.js file which is loaded as external resource on our domain.

Only thing I have found about debugging on Paypal developers page is here:

/?mark=debug

I have tried indeed to invert the condition like document.cookie="PPDEBUG=false". However, I'm still seeing the debug messaging ing through because this should be set on a cookie on the paypal sandbox domain.

Example of the console messages:

> ppxo_current_protocol_https Object {timestamp: 148465111111111,
> windowID: "4250cccccc", pageID: "7bd8cccccc", host:
> "www.project.local", path:
> "/projectlocal/fr/checkout/single"…} checkout.js:4617

> ppxo_setup_production Object {timestamp: 148465111111111, windowID:
> "4250cccccc", pageID: "7bd8cccccc", host: "www.project.local",
> path: "/projectlocal/fr/checkout/single"…}

Here another link related:

I've tried few approaches to disable Paypal post-robot debug messages on my browser's console but none seemed to work.

The reason these messages can be quite annoying is that they make debugging the browser harder because there is plenty of them, hiding some other console warnings.

The console logs are ing from Paypal checkout.js file which is loaded as external resource on our domain.

Only thing I have found about debugging on Paypal developers page is here:

https://developer.paypal./docs/classic/express-checkout/in-context/javascript_advanced_settings/?mark=debug

I have tried indeed to invert the condition like document.cookie="PPDEBUG=false". However, I'm still seeing the debug messaging ing through because this should be set on a cookie on the paypal sandbox domain.

Example of the console messages:

> ppxo_current_protocol_https Object {timestamp: 148465111111111,
> windowID: "4250cccccc", pageID: "7bd8cccccc", host:
> "www.project.local", path:
> "/projectlocal/fr/checkout/single"…} checkout.js:4617

> ppxo_setup_production Object {timestamp: 148465111111111, windowID:
> "4250cccccc", pageID: "7bd8cccccc", host: "www.project.local",
> path: "/projectlocal/fr/checkout/single"…}

Here another link related: https://github./krakenjs/post-robot

Share Improve this question edited Jan 25, 2017 at 21:48 Alessandro Incarnati asked Jan 17, 2017 at 11:38 Alessandro IncarnatiAlessandro Incarnati 7,2463 gold badges40 silver badges56 bronze badges 4
  • Did you try the inverse of what's described in the documentation link you posted - open your browser console while your page is loaded and run document.cookie="PPDEBUG=false"? – Sam Hanley Commented Jan 20, 2017 at 15:51
  • Yes, of course I tried. No luck though. :) – Alessandro Incarnati Commented Jan 20, 2017 at 15:55
  • There's an open issue highlighting a solution for this on the GitHub page: github./krakenjs/post-robot/issues/11 No idea if that config is exposed to you on the express checkout implementation though, but probably worth looking into :) – Lenny Markus Commented Jan 20, 2017 at 16:46
  • Nope, unfortunately that config is not exposed to me. Thanks anyway – Alessandro Incarnati Commented Jan 23, 2017 at 8:32
Add a ment  | 

2 Answers 2

Reset to default 4

If you're using chrome, you can set up regex filters

^(?!.*?(ppxo|xc_|post-robot))

Loading checkout.js with a log level set to 'error' will prevent the 'debug' and 'info' level messages:

<script src="https://www.paypalobjects./api/checkout.js" data-log-level="error"></script>

When looking at the JS code from checkout.js, this seems to be the only option:

logLevel: currentScript.getAttribute("data-log-level"),

本文标签: javascriptDisable Paypal postrobot messaging on checkoutjshow to turn off debug modeStack Overflow