Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Getting Multi-ship Error in Storefront

  1. #1
    jwallwork is offline Member
    Join Date
    Sep 2008
    Posts
    38

    Default Getting Multi-ship Error in Storefront

    We're getting a .Net Error when we try to checkout with a cart that ships to multiple shipping addresses. The error occurs when we attempt to submit the order and appears to be in the Gateway.MakeOrder portion of the code.

    The following error occurs:

    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 364: End If
    Line 365:
    Line 366: Dim status As String = Gateway.MakeOrder(String.Empty, AppLogic.TransactionMode(), cart, OrderNumber, String.Empty, String.Empty, String.Empty, String.Empty)
    Line 367: If status = AppLogic.ro_3DSecure Then
    Line 368: Response.Redirect("secureform.aspx")


    Source File: W:\Clients\wheatgrass\docs\checkoutreview.aspx.vb Line: 366

    Issue appears to be in the function itself, the parameters (TransactionMode(),OrderNumber) being sent do have values

    This is Version 8.0.1.2 Visual Basic Source
    Payment Gateway is SagePayments

    Single address orders process correctly and are hitting the gateway.

    Has anyone else experienced this, and is there a fix? I submitted a ticket, but was told to change gateways to Protx, which doesn't make sense.

    Thanks,
    Last edited by jwallwork; 11-05-2010 at 07:10 AM.

  2. #2
    jwallwork is offline Member
    Join Date
    Sep 2008
    Posts
    38

    Default

    Additional Information:

    The following code in Gateway.vb appears to be causing the issue:

    Dim UseShippingAddress As Address = Nothing
    If (Not cart.HasMultipleShippingAddresses()) Then
    ' if only one address, let's get it so the gateway can display it:
    UseShippingAddress = New Address()
    UseShippingAddress.LoadByCustomer(cart.ThisCustome r.CustomerID, cart.FirstItemShippingAddressID(), AddressTypes.Shipping)
    End If


    From the code above it appears that if the order has multiple shipping address the UseShippingAddress field doesn't get a value and blows up the module that sends the data to SagePayments.