<div id=”paypal-button-container-P-6XF8319328801250CMDGRCAY”></div>
<script src=”https://www.paypal.com/sdk/js?client-id=AY-a2Z5cSug0yqPuPweTtRhB2jGygUC5XHTImp9lISZlHXmyR3QOAu7dfZXjBO5pYo3_fuac0dTnFDoe&vault=true&intent=subscription” data-sdk-integration-source=”button-factory”></script>
<script>
paypal.Buttons({
style: {
shape: ‘pill’,
color: ‘gold’,
layout: ‘vertical’,
label: ‘subscribe’
},
createSubscription: function(data, actions) {
return actions.subscription.create({
/* Creates the subscription */
plan_id: ‘P-6XF8319328801250CMDGRCAY’
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID); // You can add optional success message for the subscriber here
}
}).render(‘#paypal-button-container-P-6XF8319328801250CMDGRCAY’); // Renders the PayPal button
</script>