I am currently working on finding a solution to passing custom variables when applying for a subscription for my created web service. The code on the front end that I have implemented so far is as follows:
const createSubscription = (data, actions) => {
return actions.subscription.create({
'plan_id': 'P-XXXXXXXXXXX',
"custom": "This is data from custom field",
"custom_id": "This is data from custom_id field"
});
};
However, upon approval from the client and receiving notifications via IPN on my back end server, I noticed that there are no fields custom_id
or custom
included at all in the notification:
{
mc_gross: '100.00',
outstanding_balance: '0.00',
... (remaining content of the original text)
}
I am looking for a way to pass additional information to update records on my backend server. Any suggestions on how to achieve this?
PS. Kindly note that this pertains to the createSubscription
function specifically and not any other functions like createOrder
.