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

Thread: Returned confirmation upon a successful checkout?

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

    Default Returned confirmation upon a successful checkout?

    I have a site that redirects my users to the store for checkout. When the checkout is complete and is successful, I want to pass back a confirmation. How can I go about getting a confirmation to another site that an order was completed (captured)?
    ...AllStar

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

    Default

    Something similar to what Paypal's Instant Payment Notification (IPN). Any ideas? If it helps, I am currently using Authorize.Net as the gateway and recently updated to the latest release of ADNSF.
    ...AllStar

  3. #3
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Event Handlers would probably be the easiest way. The NewOrder callout should work.


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

    Default

    Thanks scott. That's exactly what I needed. Yet, I'm a bit confused on how it works...

    How would I actually redirect a user from the store to my other site, after completing a successful checkout and then verify that the order was captured? Would the user have to be redirected to my site by clicking a button (response.redirect(mysite))? What if the window was closed? Upon returning to my site, I then do the callback to verify if the user has a new order. Is that right?

    How does the event handler post data back to the site from the store?
    Last edited by allstar; 05-14-2009 at 02:40 PM.
    ...AllStar

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

    Default

    Scott, I figured it out. Let me know if I'm on the right path.

    This is what I did:
    After a successful checkout, I then redirect to my site. My site would then call "aspdnsf_GetNewEvents" to check to see if there were any new events. In this case, a new order. Get the order number and customer id and use wsi calls to verify if the order transactionstate was captured.
    ...AllStar

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

    Default

    Any confirmation on this?
    ...AllStar

  7. #7
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    that should work. WSI (our web service automation interface) can pull the new order data, just set IsNew=1 on the request, so you get new orders. That should be fine. You're just polling the db, vs the sync event notification, either works in almost all scenarios. You could probably poll WSI every minute and not even dent your CPU usage.
    AspDotNetStorefront
    Shopping Cart

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

    Default

    That works great but I rather do it properly (the ADNSF way). How would I set up the sync event notification on my site to get the transaction state from the store when a product is purchase?

    This is my understanding of how the eventhandlers work from the sample that is given from the wsi manual. The WSIEventListener writes data to the eventlog where the event callbacks are set. The WSIEventViewer polls the data from the DB. This seem to be the correct path to take since I am trying to do something similar to Paypal's IPN. I want the order to be communicated back to my site.

    I also thought of another way. Using wsi, get the recent new orders for that specific user. Then check to see if the order was captured. But that raises the question, how do I know if that the order was a new event? And not 5 mins ago... By calling "aspdnsf_GetNewEvents" this guarantee that it's a new event.

    If I take this route by calling "aspdnsf_GetNewEvents", 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? I'm still a little confuse. Please shine the light.

    Any suggestions would be of help.
    Last edited by allstar; 05-21-2009 at 04:49 PM.
    ...AllStar