Luehang / react-paypal-button-v2

An easy and simple to use React button component to implement PayPal Checkout with Smart Payment Buttons V2 (Version 2).
https://luehangs.site/lue_hang/projects/react-paypal-button-v2
MIT License
274 stars 81 forks source link

[QUESTION] Javascript Errors #85

Closed Gus19 closed 3 years ago

Gus19 commented 4 years ago

Hello,

I'm starting my paypal integration and I have js errors and I don't understand where they are coming from?

image

There is my Button :

<PayPalButton
      amount="2"
      shippingPreference="NO_SHIPPING"
      onSuccess={(details, data) => {
        console.log("Transaction completed", details, data);
      }}
      style={{
        shape: 'rect',
        color: 'blue',
        layout: 'horizontal',
        label: 'pay',
        tagline: false
      }}
      options={{
        clientId: "XX",
        currency: "EUR"
      }}
    />

Thanks for your help !

frasergr commented 3 years ago

@Gus19 For me, it was due to having Brave shield and uBlock Origins enabled in the localhost environment. After disabling both of those the errors were gone.

Gus19 commented 3 years ago

Oh, good to know. Thanks !