an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > DotShoppingCart Suite > PayPal Standard Exception
Last Post 3/22/2010 7:58:18 PM By bzeider. 16 replies.
Page 1 of 2 (17 posts) << First < Prev 1 2 Next > Last >> 
3/17/2010 9:28:58 AM
bzeider
Posts: 21
Joined: 12/19/2009
PayPal Standard Exception
Luke,
 
I noticed that we are no longer getting order confirmation emails since implementing PayPal Standard. I checked the event log, and found these exceptions being logged.
 
<div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event code: 3005 </span>
<div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event message: An unhandled exception has occurred. </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event time: 3/14/2010 3:34:37 PM </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event time (UTC): 3/14/2010 7:34:37 PM </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event ID: ffe5017292014bae9876881fe71f60a6 </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event sequence: 915 </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event occurrence: 2 </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Event detail code: 0 </span> <div style="margin: 0in 0in 0pt">  <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Application information: </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Application domain: /LM/W3SVC/122040043/Root-1-129130248270156250 </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Trust level: Full </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Application Virtual Path: / </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Application Path: C:\Inetpub\silverandgoldshop\ </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Machine name: WEBSERVER3 </span> <div style="margin: 0in 0in 0pt">  <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Process information: </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Process ID: 3724 </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Process name: aspnet_wp.exe </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Account name: WEBSERVER3\ASPNET </span> <div style="margin: 0in 0in 0pt">  <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Exception information: </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Exception type: NullReferenceException </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Exception message: Object reference not set to an instance of an object. </span> <div style="margin: 0in 0in 0pt">  <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Request information: </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Request URL: https://www.MYDOMAINNAMEHERE.com/Store/PaypalIPNHandler.aspx</span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Request path: /Store/PaypalIPNHandler.aspx </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    User host address: MY IP HERE</span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    User:  </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Is authenticated: False </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Authentication Type:  </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Thread account name: WEBSERVER3\ASPNET </span> <div style="margin: 0in 0in 0pt">  <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">Thread information: </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Thread ID: 30 </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Thread account name: WEBSERVER3\ASPNET </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Is impersonating: False </span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">    Stack trace:    at PaypalIPNHandler.Page_Load(Object sender, EventArgs e)</span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)</span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)</span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">   at System.Web.UI.Control.OnLoad(EventArgs e)</span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">   at System.Web.UI.Control.LoadRecursive()</span> <div style="margin: 0in 0in 0pt"><span style="font-size: 8.5pt">   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</span>
3/17/2010 10:02:44 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: PayPal Standard Exception
Which version of DotShoppingCart are you running? Check web\Store\PaypalIPNHandler.aspx.cs file to see if you have the yellow background lines below.
 
    protected void Page_Load(object sender, EventArgs e) {
        byte[] param = Request.BinaryRead(Request.ContentLength);
        string strRequest = Encoding.ASCII.GetString(param);
 
        Dictionary<string, string> values;
        if (PaypalStandardProvider.VerifyIPN(strRequest, out values)) {
            decimal total = decimal.Parse(values["mc_gross"]);
            if (!values.ContainsKey("custom"))
                return;
            string orderNumber = values["custom"];
            Order order = Order.Get(orderNumber);
DotShoppingCart Staff
3/17/2010 11:18:50 AM
bzeider
Posts: 21
Joined: 12/19/2009
Re: PayPal Standard Exception
4.01 - yes, I have that code.
3/17/2010 11:40:30 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: PayPal Standard Exception
Try to copy both web\Store\PaypalIPNHandler.aspx and web\Store\PaypalIPNHandler.aspx.cs files to your server so that it will show the line# when the exception happens again. Please post back the full exception stack and I should be able to find out the root cause.
DotShoppingCart Staff
3/19/2010 4:34:24 PM
bzeider
Posts: 21
Joined: 12/19/2009
Re: PayPal Standard Exception
Well I have both the aspx and aspx.cs files uploaded. This is the complete exception...no lines numbers.
 
<p class="MsoNormal" style="margin: 0in 0in 0pt"><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt">System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at PaypalIPNHandler.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(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) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.store_paypalipnhandler_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) <o:p></o:p></span>

3/19/2010 4:53:09 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: PayPal Standard Exception
Without line number I cannot help figure out what went wrong. Are you sure both source code files are up on the right location on the server?
DotShoppingCart Staff
3/19/2010 5:02:08 PM
bzeider
Posts: 21
Joined: 12/19/2009
Re: PayPal Standard Exception
Very sure, I even reuploaded the files to be sure...still no line numbers. Then I wrapped the page load event in a try-catch and had the catch email me the exception...no line numbers. If you have any ideas I can add more code to the page.
3/19/2010 5:14:18 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: PayPal Standard Exception

My guess is that orderNumber was invalid. See the code below.

            string orderNumber = values["custom"];
            Order order = Order.Get(orderNumber);

Try to catch the entire value of  "strRequest" and post it back.

DotShoppingCart Staff
3/22/2010 11:55:55 AM
bzeider
Posts: 21
Joined: 12/19/2009
Re: PayPal Standard Exception
I think you're right, though I don't know why the number would be invalid. I changed <compilation debug="true"> in the web.config and I got the line numbers. It's failing on this line:
 
trans.Add(order.OrderNumber);
 
I will try-catch and have the system send me the value of strRequest so that you can see it.
3/22/2010 12:55:33 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: PayPal Standard Exception
It means that PayPal was sending you the notification which was not orignated from the software. I think you can simply ignore it.
DotShoppingCart Staff
3/22/2010 12:56:49 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: PayPal Standard Exception
Or simply add the yellow lines below to stop the exception.
 
            Order order = Order.Get(orderNumber);
            if (null == order)
                return;
DotShoppingCart Staff
Page 1 of 2 (17 posts) << First < Prev 1 2 Next > Last >>