PayPal Javascript errors

  • Posts: 200
  • Thank you received: 12
  • Hikashop Business
17 hours 53 minutes ago #369761

I added the PayPal checkout plugin and I got some JS errors.

Failed to load resource: the server responded with a status of 422 ()
message?currency=EUR&amount=0&channel=UPSTREAM&features=native-modal&page_type=category&style=%7B%2…:1 The source list for the Content Security Policy directive 'script-src' contains an invalid source: 'GfcG400PY+S0YDoJ10542N1p9I9r2US5NCiBn4ndimE='. It will be ignored.

message?currency=EUR&amount=0&channel=UPSTREAM&features=native-modal&page_type=category&style=%7B%22text%22%3A%7B%22color%22%3A%22black%22%7D%2C%22layout%22%3A%22text%22%7D&client_id=BAAeY4Fus6jQXMHjXGUstwXeAVDspzKVd_68bPCAtHjA4QOpTNeIN4Q_M1i7wSai2Y4VGGlVWlGPX5GSMI&merchant_config=d4392e122b01ee129fa1fc68da01cf99bd098534&treatments=ec556cfbd94505750fec7ad514545fd54c238048&sdkMeta=eyJ1cmwiOiJodHRwczovL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9QkFBZVk0RnVzNmpRWE1IalhHVXN0d1hlQVZEc3B6S1ZkXzY4YlBDQXRIakE0UU9wVE5lSU40UV9NMWk3d1NhaTJZNFZHR2xWV2xHUFg1R1NNSSZjb21wb25lbnRzPW1lc3NhZ2VzIiwiYXR0cnMiOnsiZGF0YS1wYXJ0bmVyLWF0dHJpYnV0aW9uLWlkIjoiSElLQVJJU09GVFdBUkVfQ2FydF9QUENQIiwiZGF0YS11aWQiOiJ1aWRfd2lvY2hmY3d2bmN1dGZpY3h2bGJlYW11bHBtb3JiIn19&env=production&version=1.75.0&integrationType=SDK&deviceID=uid_7f4e61a7af_mtm6mtc6mtu&sessionID=uid_61faa9b4e4_mtm6mtc6mtu&scriptUID=uid_wiochfcwvncutficxvlbeamulpmorb&message_request_id=uid_8d86816036_mtm6mza6mza&partnerAttributionId=HIKARISOFTWARE_Cart_PPCP&disableSetCookie=true:8 paypal_messages_content_unavailable {description: 'No content was available for the requested account and parameters.'}

(anonymous) @ message?currency=EUR&amount=0&channel=UPSTREAM&features=native-modal&page_type=category&style=%7B%22text%22%3A%7B%22color%22%3A%22black%22%7D%2C%22layout%22%3A%22text%22%7D&client_id=BAAeY4Fus6jQXMHjXGUstwXeAVDspzKVd_68bPCAtHjA4QOpTNeIN4Q_M1i7wSai2Y4VGGlVWlGPX5GSMI&merchant_config=d4392e122b01ee129fa1fc68da01cf99bd098534&treatments=ec556cfbd94505750fec7ad514545fd54c238048&sdkMeta=eyJ1cmwiOiJodHRwczovL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9QkFBZVk0RnVzNmpRWE1IalhHVXN0d1hlQVZEc3B6S1ZkXzY4YlBDQXRIakE0UU9wVE5lSU40UV9NMWk3d1NhaTJZNFZHR2xWV2xHUFg1R1NNSSZjb21wb25lbnRzPW1lc3NhZ2VzIiwiYXR0cnMiOnsiZGF0YS1wYXJ0bmVyLWF0dHJpYnV0aW9uLWlkIjoiSElLQVJJU09GVFdBUkVfQ2FydF9QUENQIiwiZGF0YS11aWQiOiJ1aWRfd2lvY2hmY3d2bmN1dGZpY3h2bGJlYW11bHBtb3JiIn19&env=production&version=1.75.0&integrationType=SDK&deviceID=uid_7f4e61a7af_mtm6mtc6mtu&sessionID=uid_61faa9b4e4_mtm6mtc6mtu&scriptUID=uid_wiochfcwvncutficxvlbeamulpmorb&message_request_id=uid_8d86816036_mtm6mza6mza&partnerAttributionId=HIKARISOFTWARE_Cart_PPCP&disableSetCookie=true:8

Please Log in or Create an account to join the conversation.

  • Posts: 84815
  • Thank you received: 13812
  • MODERATOR
14 hours 31 minutes ago #369762

Hi,

Based on the JavaScript errors you are seeing, this issue is not coming from HikaShop itself but from a Content Security Policy (CSP) restriction on your website.

The PayPal Checkout integration relies on loading the PayPal JavaScript SDK from external PayPal domains. If your site uses a CSP that does not explicitly allow these domains (or contains invalid sources), the browser will block or ignore the PayPal scripts, which results in the console errors you reported.

In Joomla, this is most commonly caused by the HTTP Headers plugin, when the Content-Security-Policy is enabled but not properly configured for PayPal.

We recommend configuring the CSP exactly as explained in the PayPal Checkout plugin documentation:
www.hikashop.com/support/documentation/341-paypal-checkout.html

In particular, please make sure that the required PayPal domains are allowed in the relevant CSP directives (`script-src`, `connect-src`, `frame-src`, etc.), or temporarily disable the CSP to confirm that it is the cause of the issue.

Once the CSP is correctly configured in the Joomla HTTP Headers plugin, the PayPal JavaScript errors should disappear and the checkout should work normally.

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum