<div id="paypal-button-container-P-0X661417HN9623731MLIWF2I"></div>
<script src="https://www.paypal.com/sdk/js?client-id=AdNSxFIJS6bFZ-gv3iyb00T2bTF2Wd1l49cdlPsENRcQNRVhd22elHl8TbhL6y58xEi_69735cMcuO44&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: 'P-0X661417HN9623731MLIWF2I'
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID); // You can add optional success message for the subscriber here
}
}).render('#paypal-button-container-P-0X661417HN9623731MLIWF2I'); // Renders the PayPal button
</script>