1

だから私はサイトにPayPalボタンを置こうとしていますが、これは私の問題です.scriptタグを除いてReactの中間者です

このエラーが表示されました

Failed to compile.

./src/billings/paypal/connectwithpaypalbutton.js
  Line 16:29:  'login' is not defined  no-undef

Search for the keywords to learn more about each error.

これが、貼り付けるように指示したPayPalボタン付きのコードです

class ConnectWithPayPal extends Component {
    render() {
        return (
            <div>
                <span id='cwppButton'></span>
                <script src='https://www.paypalobjects.com/js/external/connect/api.js'></script>
                <script>
                    <span id='cwppButton'></span>
                    <script src='https://www.paypalobjects.com/js/external/connect/api.js'></script>
                    <script>
                        paypal.use( ['login'], function (login) {
                            login.render({
                                "appid": "",
                                "authend": "sandbox",
                                "scopes": "openid",
                                "containerid": "cwppButton",
                                "responseType": "code id_Token",
                                "locale": "en-us",
                                "buttonType": "CWP",
                                "buttonShape": "pill",
                                "buttonSize": "md",
                                "fullPage": "true",
                                "returnurl": ""
                            })
                        });
                    </script>
                </script>
            </div>
        )
    }
}
4

0 に答える 0