Subscription Custom ID not being returned in IPN

WasntAFairFight
Contributor
Contributor

Hello,

 

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. Edit:Should state it shows when I check subscriptions in the subscription manager but doesn't appear in the IPN history.

 

Could anyone explain where I'm going wrong?

 

Code Below, If you need any more information to help please say so I'm happy to provide it.

 

<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>

 
Thank you for your time and I really look forward to an answer :).
 
 
 
 
 
Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.