我在前端使用React / Redux设置了使用PayPal登录。
带有id" lippbutton"的范围呈现,但由于某种原因,我已经开始看到至少两个按钮显示为内联。如果我检查,我会看到" lippbutton"作为父母和两个或三个贝宝按钮作为孩子,每个按钮都有自己独特的贝宝指定ID。
任何人都有任何关于为什么会这样做的想法?
export default class PayPalLoginButton extends React.Component {
constructor(props) {
super(props);
}
render() {
paypal.use( ['login'], function (login) {
login.render ({
"appid":"myappid",
"authend":"sandbox",
"scopes":"openid profile address email",
"containerid":"lippButton",
"locale":"en-us",
"returnurl":"http://localhost:8080/paypal",
"text": 'Sign Up With PayPal'
});
});
return (
<span id='lippButton'></span>
);
}
}