hello in trying to convert my PayPal smart subscription button javascript into the server-side particularly on PHP. But I keep looking online and PayPal documentation still can't find and sources. It is similar to this PayPal demo of server-side.
<div id="paypal-button-container"></div>
<script src="https://www.paypal.com/sdk/js?client-id=Subscription_id&vault=true" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'horizontal',
label: 'subscribe'
},
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': 'Plan_id'
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID);
}
}).render('#paypal-button-container');
</script>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…