你好,我正在尝试将我的 PayPal 智能订阅按钮 javascript 转换为服务器端,特别是 PHP。但我一直在网上查找,PayPal 文档仍然找不到来源。它类似于服务器端的 PayPal 演示。
<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>
哔哔one