Accepting credit cards, warehouses, and shipping and fulfilling orders
Hi,
Does anyone know how to add PayPal pay in 4 messages to products pages. PayPal provides the JS SDK code, but that is not working. I have used their code, but it only creates the space for the message, but the message is not displaying.
Thanks
You code should look something like the below.
In fact if you add your ID in this code should render something close to what you're after.
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&components=messages,buttons&disable-funding=c...">
</script>
<!-- this renders the message -->
<div
data-pp-message
data-pp-amount="119.00"
data-pp-style-text-align="center"
data-pp-style-text-size="14">
</div>
<!-- this renders the buttons-->
<div id="paypal-button-container"></div>
<script>
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '119.00'
}
}]
});
},
style: {
layout: 'horizontal',
shape: 'rect',
label: false,
tagline: false
}
}).render('#paypal-button-container');
</script>
How can I get current product price automatically in data-pp-amount?
We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024