an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > Error Using Google Checkout with Coupon
Last Post 2/28/2013 7:52:10 AM By Guia. 4 replies.
2/26/2013 10:50:37 AM
Guia
Posts: 18
Joined: 8/24/2011
Error Using Google Checkout with Coupon
Hello.  We are getting the following error when using Google Checkout with a coupon.  We don't receive this error if the transaction does not use a coupon.  Any insight would be appreciated.
 
Thank you,
 
David Lloyd
Lemington Consulting
 

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 112:                if (null != referralId)
Line 113:                    otherInfo.Add(new KeyValuePair<string, string>("referralId", referralId.ToString()));
Line 114:                string url = GoogleCheckoutProvider.PostCart(cart, userName, otherInfo);
Line 115:                Response.Redirect(url, true);
Line 116:            } catch (PaymentExecption ex) {

Source File: e:\Guia\web\Store\GoogleCheckoutButton.ascx.cs Line: 114

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   DotShoppingCart.Commercial.Shipping.ShippingService.<GetAllShippingMethods>b__1(CartItem ci) +3
   System.Linq.Lookup`2.Create(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +232
   System.Linq.GroupedEnumerable`3.GetEnumerator() +87
   DotShoppingCart.Commercial.Shipping.ShippingService.GetAllShippingMethods(Cart cart) +260
   DotShoppingCart.Commercial.Payment.GooglePaymentProvider.PostCart(Cart cart, String userName, List`1 otherInfo) +3743
   Controls_GoogleCheckoutButton.btnGoogleCheckout_Click(Object sender, EventArgs e) in e:\Guia\web\Store\GoogleCheckoutButton.ascx.cs:114
   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +186
   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +164
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3706

 
 
2/26/2013 9:47:02 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Error Using Google Checkout with Coupon
It seems that you didn't define shipping methods. Make sure you define shipping rate.
DotShoppingCart Staff
2/27/2013 5:20:35 AM
Guia
Posts: 18
Joined: 8/24/2011
Re: Error Using Google Checkout with Coupon
We have three shipping methods defined.  As I mentioned, it works without the coupon, so if it were a missing shipping method, it would appear that it would error in both cases but it does not.
2/28/2013 7:39:51 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Error Using Google Checkout with Coupon
Which version of DotShoppingCart are you using? It seems that your version doesn't support sending coupon code to Google Checkout.
DotShoppingCart Staff
2/28/2013 7:52:10 AM
Guia
Posts: 18
Joined: 8/24/2011
Re: Error Using Google Checkout with Coupon
DotShoppingCart Version 4.5 purchased 6/28/2011.