My Next.js(React.js+Node.js project)
I want to connect PayPal, I do it according to their documentation using JS SDK (@paypal/react-paypal-js)
const initialOptions = { clientId: PAYPAL_CLIENT_ID, enableFunding: 'paypal', // disableFunding: '', // country: 'US', buyerCountry: 'US', <= mock my country here currency: 'USD', intent: 'capture', // dataPageType: 'product-details', components: 'buttons,googlepay', // dataSdkIntegrationSource: 'developer-studio'};// Renders errors or sucessfull transactions on the screen.const Message = ({content}) => <p>{content}</p>;const Checkout = (props) => { const { } = props; const [message, setMessage] = useState(''); return (<div className=''> TEST<PayPalScriptProvider options={initialOptions}><PayPalButtons style={{ shape: 'rect', layout: 'vertical', color: 'gold', label: 'paypal', }} /></PayPalScriptProvider><Message content={message} /></div> )}export default Checkout;
I haven't started writing the logic yet, I wanted it to show all the buttons I needed first, but there is no G-Pay button, despite the fact that I specified buyerCountry=US, and I was shown the "Pay later" button:
In developer dashboard I set G-Pay checkbox for my sandbox app:
Thanks for any help!