Hi folks! I’m having an issue when trying to use the HTML embed. I’m trying to embed a Paypal smart button. The button flashes for a second and then stops showing on the canvas. Here’s the code I’m using in the embed. Any idea why this isn’t working?
<div id="paypal-button-container-PLAN-ID"></div>
<script src="<https://www.paypal.com/sdk/js?client-id=ID_v&vault=true&intent=subscription>" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'subscribe'
},
createSubscription: function(data, actions) {
return actions.subscription.create({
/* Creates the subscription */
plan_id: 'PLAN-ID'
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID); // You can add optional success message for the subscriber here
}
}).render('#paypal-button-container-PLAN-ID'); // Renders the PayPal button
</script>
Hi @heady_cod, when I paste that code into a blank HTML doc it doesn’t work either, I’m guessing you need some IDs in there (maybe you have these already and that’s how you were able to get it to partially work, but I can’t try it myself)