Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 516

G-Pay button not displayed - PayPal JS SDK

$
0
0

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:enter image description here

In developer dashboard I set G-Pay checkbox for my sandbox app:enter image description here

Thanks for any help!


Viewing all articles
Browse latest Browse all 516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>