• Hello, I am having a some issues with my Woocommerce site throwing an error at checkout when using the Payments Plugin for Braintree in Safari. The error message is below with some of the id info removed.

    “There was an error loading the PayPal SDK. Please provide the following details to your plugin developer.PayPal config: {“displayName”:”,”assetsUrl”:””,”environment”:”live”,”environmentNoNetwork”:false,”unvettedMerchant”:false,”braintreeClientId”:””,”billingAgreementsEnabled”:true,”payeeEmail”:null,”currencyIsoCode”:”USD”}PayPal SDK query: https://www.paypal.com/sdk/js?client-id=XXX_&components=buttons,messages¤cy=USD&enable-funding=paylater&vault=false&commit=false&intent=capture”

    Any ideas what could be causing this? I saw that it could be related to cookies and cleared those but still no luck. I have also tested with a staging site that has all caching disabled but there was no change. The page seems to struggle to load fully with the blue load bar hanging across the top and then the error will appear after a couple of minutes.

    Thank you!

    • This topic was modified 11 months, 1 week ago by happyday25.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @happyday25,

    What version of Safari and iOS device are you testing with?

    Are you able to share a website url where this can be observed? I am unable to replicate this behavior on Safari.

    Kind Regards

    Thread Starter happyday25

    (@happyday25)

    Hi @mrclayton,

    I am using Safari on iOS 17.1.2. I wasn’t able to find a Safari specific version number, I think it is paired with the OS. Would it be alright to share the link via your support email? I didn’t want to post it here since it seemed like the error might be showing some private information.

    Thank you!

    Plugin Author Payment Plugins

    (@mrclayton)

    All the info in that message is public. But you can create a support ticket here for privacy.

    Disclaimer: the user asked to share their website privately. We are not asking for any information beyond the website link.

    Thread Starter happyday25

    (@happyday25)

    Hi @mrclayton, sorry for the delayed response. I was hoping making some updates to the site would solve the problem but it is still persisting. I sent an email via the support link though with the information here. Thank you and please let me know if this is something that you can take a look at.

    Thread Starter happyday25

    (@happyday25)

    I am also seeing several warning indicators in the browser console when loading the page similar to this:

    • Some cookies are misusing the recommended “SameSite“ attribute 14: Cookie “LANG” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite”
    • Partitioned cookie or storage access was provided to “https://checkout.paypal.com/web/3.98.0/html/dispatch-frame.min.html” because it is loaded in the third-party context and dynamic state partitioning is enabled.
    • Partitioned cookie or storage access was provided to “https://assets.braintreegateway.com/web/3.98.0/html/hosted-fields-frame.min.html#xxx” because it is loaded in the third-party context and dynamic state partitioning is enabled.
    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @happyday25

    The plugin loads the required scripts to process a payment. Braintree’s JS sdk loads external scripts which it uses to facilitate the payment. We have no control over the scripts and attributes that Braintree uses when loading their code.

    Those warnings won’t have any effect on your ability to process payments.

    Kind Regards

    Thread Starter happyday25

    (@happyday25)

    Thank you for the information, after further testing I realized this was a conflict between the payment plugin and Cloudflare’s Turnstile plugin. After completely removing the turnstile plugin, the checkout began functioning normally again.

    Thread Starter happyday25

    (@happyday25)

    Well after more testing, it turns out the issue is not resolved after all. It is a difficult one to test as it happens intermittently.

    I have found some threads on PayPal of other users having the same issue in various versions of Safari and MacOS:

    https://www.paypal-community.com/t5/SDKs/Paypal-SDK-not-loading-in-Safari-16-6/td-p/3090733

    https://www.paypal-community.com/t5/SDKs/JS-SDK-error-with-Safari-17-2/td-p/3131709

    Do either of these suggest a solution that could be patched through the payment plugin? This part seemed like it may have some relevance in particular:

    “On the page containing the link redirecting to the payment page (page with the PayPal button)

    "<a href='https://yourdomain.com/yourpaymentpage.php' ?rel='noreferrer'>Payment<\a>"

    or using a JS redirect

    var url = document.createElement("a");
    url.referrerPolicy = "no-referrer";
    url.rel = "noreferrer";
    url.;
    url.click();

    There may be a better way to do the JS, but this will simply create a HTML link element on the referring page and then self click it.”

    • This reply was modified 9 months, 1 week ago by happyday25.
    Thread Starter happyday25

    (@happyday25)

    Hi @mrclayton, I also reached out to Braintree directly and they said to do any further testing on their end of this issue, the web version would need to be updated to version 3.100.0 and Braintree php library 6.13.0. Is this something that will be updated in the plugin soon?

    • This reply was modified 9 months ago by happyday25.
    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @happyday25

    The plugin already uses version 6.13.0 of the PHP library. Regarding the web version, your issue is not related to that so the version that the plugin uses should not matter at all.

    The plugin uses web version 3.98.0.

    Kind Regards

    Thread Starter happyday25

    (@happyday25)

    Hi @mrclayton,

    Thank you for the information, I had a typo in my last post and meant to ask if the version will be updated to 6.16.0 php soon? Is there a timeline for updating to version 3.100.0 as well?

    Was there any information in the message I posted last week that seemed like it could be relevant to solving the issue through the plugin?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘There was an error loading the PayPal SDK’ is closed to new replies.