Reputation: 176
I am developing a page that sends me a payment to activate a paid plan of a discord bot. So I used paypall sdk.
This is my js code:
paypal.Buttons({
style: {
color: 'blue',
shape: 'pill'
},
createOrder:function (data, actions){
return actions.order.create({
purchase_units: [{
amount:{
value: '1.00'
}
}]
});
},
onApprove:function (data, actions){
return actions.order.capture().then(function (details){
console.log(details)
})
}
}).render('#paypal-payment-button');
What do I need to add to enter information in the transaction?
What do I mean by information in the transaction? I mean a string that identifies the server that must obtain the upgrade (so I need it to verify the transaction and then activate the paid plan at that particular guild id, so, the server id)
Upvotes: 0
Views: 39
Reputation: 30377
In an Orders create request body's purchase_units , you can include an arbitrary custom_id
.
Upvotes: 1