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 7 of 7

Thread: aspdnsf_GetNewEvents?

  1. #1
    allstar is offline Member
    Join Date
    Apr 2009
    Posts
    90

    Default aspdnsf_GetNewEvents?

    By calling "aspdnsf_GetNewEvents" from a different site, will this be a problem if two users where to purchase a service at about the same time? How can I get the correct new event for that particular user since "aspdnsf_GetNewEvents" only gets the newest events?
    ...AllStar

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    I'm not familiar with that stored procedure. Is this something that you've added custom? If so you'll have to elaborate on what it's pulling from where and how in order for us to try and help you out...
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    allstar is offline Member
    Join Date
    Apr 2009
    Posts
    90

    Default

    George, this is the call using the example from the WSI samples (WSIEventViewer).

    For example, when a user signs up on my other site by credit card, I am redirecting the user to the store to complete the transaction. Once the transactionstate has been captured, I then redirect the user back to my signin.aspx page. On pageload, I call "aspdnsf_GetNewEvents" to get the newest order which returns the order number and customer id (assuming it's the same user). I use the get new order wsi call and check for transactionstate of that order. If it's captured, the sign up process is complete and I log them in.

    My question is, when I redirect the user back to my sign in page after a successful order. How do I know if the order that is being pulled from "aspdnsf_GetNewEvents" is associated with the customer that was signing up (is the same user)? By calliing "aspdnsf_GetNewEvents", it logs the latest order into the db. This would be a problem if numerous users sign up at about the same time. How can I be assure that it's the right user processing the right information? Can a user process a order at the same time? Unless I am understanding the event notification incorrectly...
    Last edited by allstar; 05-26-2009 at 02:26 PM.
    ...AllStar

  4. #4
    allstar is offline Member
    Join Date
    Apr 2009
    Posts
    90

    Default

    Any suggestions? I need to implement this asap... thanks!!!
    ...AllStar

  5. #5
    mudge is offline Junior Member
    Join Date
    Feb 2009
    Posts
    10

    Default

    I dont think I would use that stored procedure to return that info to a remote site. aspdnsf_GetNewEvents is just a sample stored procedure for WSI export of all new orders.

    If you have the WSI infrastructure between your sites, you could use the Get or sql features to just get info on one user.

  6. #6
    allstar is offline Member
    Join Date
    Apr 2009
    Posts
    90

    Default

    If the user already exists on my site, then yes, I can use the get or sql feature of the wsi interface. However, in the case of a new sign up. The user doesn't exist on my site or the store. I want to make sure that the user is redirected to the store and pays for the subscription successfully before giving them access to my other site. From my understanding, by calling aspdnsf_GetNewEvents, it gets the latest order. So this works great when I redirect the user from the store back to my site. However, I'm uncertain if this will work if several users are redirected back at right about the same time.

    Even if I was to use the Get (example below) to get the new order, how will I know if it's the correct user. Especially in the case where several users are signing up at the same time.

    <AspDotNetStorefrontImport Verbose="false">
    <Get Table="Orders" Name="NewOrders">
    <XmlPackage>DumpOrder.xml.config</XmlPackage>
    <OrderBy>OrderDate asc</OrderBy>
    <Criteria IsNew="1"/>
    </Get>
    </AspDotNetStorefrontImport>

    What's the best way of trying to automate this? Help, asap. Thanks for the response mudge!
    Last edited by allstar; 05-28-2009 at 11:28 AM.
    ...AllStar

  7. #7
    mudge is offline Junior Member
    Join Date
    Feb 2009
    Posts
    10

    Default

    Another solution would be to determine the users ip address from your site and then use that in the WSI getorders criteria isnew=1 and lastipaddress=x.x.x.x

    That would insure that you just get the one order that the user just completed.