I set up a subscription button that used a custom_id generated on my end to track when a payment came through to add to the database. It was the case that the custom_id could be grabbed from the IPN notification using "$_POST["rp_invoice_id"]".
However a few days after confirming it was working on the live account it suddenly stopped sending the custom_id back in the IPN messages but still shows it as the "Custom ID" in the subscription details on the main PayPal website. Doesn't show in IPN sent messages :/
Code Below, If you need any more information I'm happy to provide it.
I really hope someone has an answer as to how I'm being an idiot .
However a few days after confirming it was working on the live account it suddenly stopped sending the custom_id back in the IPN messages but still shows it as the "Custom ID" in the subscription details on the main PayPal website. Doesn't show in IPN sent messages :/
Code Below, If you need any more information I'm happy to provide it.
HTML:
<script src="https://www.paypal.com/sdk/js?client-id=AURxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&vault=tru..." data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'pill',
color: 'black',
layout: 'vertical',
label: 'subscribe',
},
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': 'P-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'custom_id': "" + params.get('bearer') + "", //Where I set the custom ID to be returned in IPN.
"application_context" : {
"shipping_preference":"NO_SHIPPING"
}
});
},
onApprove: function(data, actions) {
document.getElementById("payment-created").style.display="block";
}
}).render('#paypal-button-container');
</script>
I really hope someone has an answer as to how I'm being an idiot .