PayPal Callback Errors


https://forum.kartris.com/Topic1590.aspx
Print Topic | Close Window

By UKcentric - Wed 29 Feb 2012
We're getting lots of errors in our error logs like these, many per day. Now PayPal are emailing us saying that our IPNs are not working and may be disabled soon.

The weird thing is, that there are no payments on PayPal that don't tally up with orders in our system, so we think payments are being correctly registered.

So what's the deal with all these errors? Thanks, g.

-----------------------------------------------------------------------------
>>     URL:http://www.curtisward.com/Callback.aspx?g=paypal
>>     Page:
-----------------------------------------------------------------------------
>>     29/02/2012 10:12:27
>>     66.211.170.66
>>     DESCRIPTION:
System.InvalidCastException: Conversion from string "" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format.
   at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
   at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
   --- End of inner exception stack trace ---
   at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
   at Kartris.Paypal.ProcessCallback(String strCallbackData, String strReferrerURL)
   at Callback.Page_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
By UKcentric - Wed 5 Feb 2014
For anybody else experiencing this issue, we have finally figured it out. It is not Kartris-related as such.

We have our PayPal account configured to make a callback to our web site every time a payment is taken.

We sell much more through eBay, and PayPal doesn't discriminate between Kartris payments and eBay payments - it makes that callback in either case.

So Kartris was being bombarded with eBay callbacks, which it was (rightly) raising an error for.

We are now in the process of modifying the Kartris callback code to discriminate between Kartris and eBay callbacks, and ignore the eBay ones.