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
275 stars 81 forks source link

[BUG] #60

Open akiarostami opened 4 years ago

akiarostami commented 4 years ago

To Do First

Software Package Version: 2.6.2

Describe the bug I use the component as said in the documentation, with minimum configuration:

import React from 'react';
import { PayPalButton } from "react-paypal-button-v2";

const PayPalBtn = (props) => (
  <PayPalButton
    amount="1.00"
    shippingPreference="NO_SHIPPING"
    onSuccess={(details, data) => {
      alert("Transaction completed by " + details.payer.name.given_name);
      return fetch("/paypal-transaction-complete", {
        method: "post",
        body: JSON.stringify({
          orderID: data.orderID
        })
      });
    }}
  />     
);

export default PayPalBtn;

It is working. However, I get this error in the browser's console:

index.js:1 Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of a which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node in div (created by a) in a (created by PayPalButton) in PayPalButton (at PayPalBtn.js:5)

Expected behavior I expect not to see that error! :)

Desktop (please complete the following information):

tananai commented 4 years ago

Also on:

tsafs commented 3 years ago

Also on: