+ Start a Discussion
oj2131oj2131 

PaymentConnect PayPal not processing recurring IPN

Hey everybody,

 

I had programmed a donation controller that uses PaymentConnect to process donations from PayPal. Donations can be one-time or recurring, and when a donation is made, a corresponding payment object would be created. Recurring donations would create payment objects for each donation, and would increment a total donation amount under a 'Payment Profiles' object corresponding with the donor.

 

For some strange reason, my program stopped processing IPN's from PayPal recurring transactions. The code worked fine until 10/21, when suddenly all recurring payments stopped being created in Salesforce. The money is still being transferred to the PayPal account, and normal credit card transactions are still being processed, but payments from recurring transactions are not.

 

Even stranger still, I tested the program with a PayPal sandbox account, and the sandbox was able to send successful recurring payment IPN's. However, my program cannot register recurring IPN's from PayPal itself. Could this be an issue with PaymentConnect?

 

Any help would be greatly appreciated! Please feel free to ask for clarification or for more information.

Jeff MayJeff May

I have been processing IPN successfully since mid-Aug, so the good news is that IPN is working.  The challenge is figuring out what happens in your code.

 

Here's a debugging trick that is really helpful assuming the IPN volume is low enough not to hit SFDC email limits.

 

In your listener class, send yourself an email with the parsed IPN message.  This will show you all the params and values.  You can do this before the validation POST if you want to make sure your listener validation isn't what's tripping you up, and you can send a slightly different subject email if the validation fails.  


Then, watch the IPN status in the Paypal console, your record creation, and your email.  When an IPN fails (in Paypal console), you can find the email and see the IPN contents.  Walk through your code for that specific message.  Problems become quite evident.

 

For those reading this and wondering "why work so hard", its because if a Paypal IPN message fails to process completely, the message "fails" with a 404 from PayPal's perspective (which is an 'authentication' error) -- not even close to the real problem.

 

LinvioIncLinvioInc

To get you started ... check your IPN configuration settings.  Make sure the IPN url points to your PaymentConnect relay script.  Make sure the API key has not been changed (e.g. on 10/21 when it stopped working for you).  Also make sure the page that takes the PayPal recurring payment is not overriding the default IPN URL setting and telling PayPal to post to another location.  And check to make sure you haven't added any validation rules or apex triggers that might be causing the IPN relay scripts in PaymentConnect to abort on inserting the new payment records.

 

If you can run a virtual terminal transaction in PayPal and the payment posts correctly to Salesforce through PaymentConnect, then the problem is probably that you are overriding the IPN URL.  If it fails, then it might be the default IPN URL setting, validation rules, triggers or API key.

 

Beyond that, I think you should seek help on the Linvio product forum or open a support ticket with us.

 

Regards,

Ron

oj2131oj2131

Thank you for your help! I'm not too sure about what you mean by the PayPal recurring payment page 'overriding the default IPN URL settings'. I use the recommended PaymentConnect VisualForce page to process the IPN's, and I send both test and real payments to the same page (albeit with different names). The VF listener uses an APEX controller created by PaymentConnect, and I have no way of viewing the code.

 

I can process one-time credit card payments, and those transactions are being correctly created and displayed. However, recurring payments automatically processed by Payment Profiles are not being created. The API key and VisualForce listener page are still the same, and I am looking into the APEX triggers now.

 

JeffM, how do you watch the IPN status in the PayPal console? Currently, I only wait for the transaction to be processed, and then assume that an IPN has been sent to the specified webpage.

LinvioIncLinvioInc

PayPal has a "default" IPN URL setting, and then you may also specify the IPN URL you want to use for a specific transaction or recurring payment profile when you create it.  This specified URL, overrides the default setting.

 

If you can run onetime transactions and PayPal posts them to your IPN listener, but not recurring payments, I imagine the code you are using to create recurring payment profiles is specifying some IPN URL other than your default URL.

 

- R

LinvioIncLinvioInc

... another possibility is that your profile name is too long or has special characters, and Salesforce is rejecting payments that are being inserted with that name. Check the Log Entries under your processor connection in Salesforce to see if PaymentConnect recorded any failed attempts to upsert data.

- R

LinvioIncLinvioInc
Rather than track your question on three different websites, let's move this discussion to the one you started on Linvio Groups.

Thanks,
Ron