<div id=”paypal-button-container-P-1W398211YN482115PMJO7MHA”></div>
<script src=”https://www.paypal.com/sdk/js?client-id=AWLz-Z130Rkgvn-9YCRq2lHYx1Z9gFyoZ2CNX2T6ueh7RdvuO7X7YKIqrMSyx0g7yRrzZ77Il7H3Xjlx&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-1W398211YN482115PMJO7MHA’
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID); // You can add optional success message for the subscriber here
}
}).render(‘#paypal-button-container-P-1W398211YN482115PMJO7MHA’); // Renders the PayPal button
</script>