Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 4.x > Installation and deployment > ShoppingCart Error View modes: 
User avatar
Member
Member
jwatson-sedonatek - 1/12/2010 9:22:24 AM
   
ShoppingCart Error
I am relatively new to CMS, but I am working on creating websites using the tool for my company. Most of the time, we do not offer e-commerce in our packages, but the first assignment that I received had one. In the past, these websites were created by another team and they did do an e-commerce release. However, they are not available any longer to question about the issue that we have run into.

The problem that I am having is when we try to finish the process in the shopping cart. Everything appears to be working fine until we get to the final step and click on the Finish Payment button. My understanding is that this should redirect the customer to the payment method selected. In this case, we only have PayPal setup and it should redirect the customer to that site.

The issue is that we receive the following error message when we click the button.

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 157: {
Line 158: // Process payment
Line 159: this.ShoppingCartControl.PaymentGatewayProvider.ProcessPayment();
Line 160: }
Line 161:


Source File: c:\websites\customer.sedonatek.com\wwwroot\carlyleanderson.sedonatek.com\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartPaymentGateway.ascx.cs Line: 159


Does anyone have any ideas on what could be causing the error at this point? We modeled the e-commerce setup off of an existing website. Currency is setup correctly. I created a shipping method after speaking with the Kentico support email. This error message appears to be created before we ever reach PayPal, so I am lead to believe that it is something on the Kentico CMS side of our site.

One of the largest issues that I am facing is the fact that I do not have access to the files on the server. Those are controlled by another team. So, any suggestions that involve changing those files will be difficult to use.

Right now, I am just hoping for some guidance on where to look to see what is causing the error and how I can get the error message to give me more detail.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/15/2010 2:14:51 AM
   
RE:ShoppingCart Error
Hi,

I sent you e-mail few days ago where I mentioned that the problem seems to be in the shipping option configuration and its assignment to the payment option. Were you able to resolve this issue because I haven't heard from you.

Thank you.

Best Regards,
Juraj Ondrus

User avatar
Certified Developer 11
Certified Developer 11
hutnyk.roman-gmail - 2/8/2012 6:01:26 AM
   
RE:ShoppingCart Error
I have the same issue in Kentico 6.

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 161: {
Line 162: // Process payment
Line 163: this.ShoppingCartControl.PaymentGatewayProvider.ProcessPayment();
Line 164: }
Line 165:

Source File: d:\INetApps\AreaRugDeal-sys\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartPaymentGateway.ascx.cs Line: 163

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
CMS.Ecommerce.OrderInfoProvider.GetInvoiceNumberInternal(OrderInfo order) +5
CMS.Ecommerce.ShoppingCartInfoProvider.GetShoppingCartResolverData(ShoppingCartInfo cart) +790
CMS.Ecommerce.ShoppingCartInfoProvider.GetShoppingCartResolverInternal(ShoppingCartInfo cart, Boolean specialMacros) +253
CMS.Ecommerce.PaymentOptionInfoProvider.ResolveUrlMacrosInternal(String url, ShoppingCartInfo cartObj) +89
CMS.Ecommerce.PaymentOptionInfoProvider.GetPaymentURLInternal(ShoppingCartInfo cartObj) +44
CMS.EcommerceProvider.CMSPaymentGatewayProvider.GetPaymentGatewayUrl() +23
CMS.EcommerceProvider.CMSAuthorizeNetProvider.ProcessPayment() +150
CMSModules_Ecommerce_Controls_ShoppingCart_ShoppingCartPaymentGateway.ProcessStep() in d:\INetApps\AreaRugDeal-sys\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartPaymentGateway.ascx.cs:163
CMS.EcommerceProvider.ShoppingCart.ButtonNextClickAction() +78
CMS.EcommerceProvider.ShoppingCartStep.ButtonNextClickAction() +15
CMSModules_Ecommerce_Controls_ShoppingCart_ShoppingCartPaymentGateway.ButtonNextClickAction() in d:\INetApps\AreaRugDeal-sys\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartPaymentGateway.ascx.cs:87
CMSModules_Ecommerce_Controls_ShoppingCart_ShoppingCart.btnNext_Click(Object sender, EventArgs e) in d:\INetApps\AreaRugDeal-sys\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCart.ascx.cs:223
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Any suggestions?
Thanks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/8/2012 6:14:09 AM
   
RE:ShoppingCart Error
Hi,

Have you checked the shipping options configuration and the payment method assignments as mentioned in my previous post?

Best regards,
Juraj Ondrus

User avatar
Certified Developer 11
Certified Developer 11
hutnyk.roman-gmail - 2/8/2012 6:17:10 AM
   
RE:ShoppingCart Error
Could you please describe dependency between them?

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/8/2012 6:34:49 AM
   
RE:ShoppingCart Error
Hi,

A shipping option has to be enabled and it has to have some payment method assigned to it.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 11
Certified Developer 11
hutnyk.roman-gmail - 2/8/2012 7:12:47 AM
   
RE:ShoppingCart Error
Thanks, that helps. But now i'm getting new error:
Unable to finish payment: Payment gateway connection failed.

I'm using Authorize.NET payment gateway.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/9/2012 3:24:28 AM
   
RE:ShoppingCart Error
Hi,

what are your settings for this payment gateway?

Best regards,
Juraj Ondrus

User avatar
Certified Developer 11
Certified Developer 11
hutnyk.roman-gmail - 2/14/2012 10:07:03 AM
   
RE:ShoppingCart Error
We are using standard Authorize.Net payment method with default settings:

▪ Payment gateway url: https://test.authorize.net/gateway/transact.dll
▪ Payment gateway assembly name: CMS.EcommerceProvider
▪ Payment gateway class name: CMS.EcommerceProvider.CMSAuthorizeNetProvider

Also it is available for each shipping option.

API login and transaction key was already set up. Use test mode is checked for now.

P.S. It would be nice if Kentico will show more detailed error message.

Thanks.


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/16/2012 2:00:54 AM
   
RE:ShoppingCart Error
Hi,

The error seems to be returned from the payment gateway. Could you please double check the API login and transaction key and also verify it with Authorize.Net that they are correct?

Best regards,
Juraj Ondrus