![](/img/trans.png)
[英]Customize PayPal Donate button to pass info through to PayPal page
[英]Paypal Subscriptions Pass subscriber info
好吧,我在 paypal 下创建了一个计划,它会生成一个订阅链接: https://www.sandbox.paypal.com/webapps/billing/plans/subscribe?plan_id=PLAN_ID
它工作得很好,但我如何传递客户端 ID 或自定义变量来识别谁在订阅它?
使用链接似乎没有办法,但如果您创建一个订阅按钮,在createSubscription
function 中传递一个计划,您也可以在其中包含一个custom_id
变量。
paypal.Buttons({
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': 'P-###.....',
'custom_id': '.....'
});
},
onApprove: function(data, actions) {
alert('You have successfully created subscription ' + data.subscriptionID);
}
}).render('#paypal-button-container');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.