so i'm about to put a PayPal button on a site but this is my problem, i'm kinda intermediate to React except the script tag
this error appeared
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.
and here is the code with PayPal button that told me to paste
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>
)
}
}