Hi guys, I want to create two subscription with two plan_id (I tested it with one successfully). How do I have to change my code so that two subscription can start? let plan_id = ['P-87175610EX683864NML6XXXX', 'P-6NT18915PW169903AML6XXXX'];
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
// Set up the transaction
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': plan_id[0]
});
},
// Finalize the transaction
onApprove: function(data, actions) {
console.log("approve");
console.log(data);
console.log(actions);
let js = {
subscriptionID: data.subscriptionID,
orderID: data.orderID,
facilitatorAccessToken: data.facilitatorAccessToken,
plan_id: plan_id
}
console.log(js);
},
... View more