Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dennis Luzada 13 posts 43 karma points
    Sep 24, 2012 @ 18:10
    Dennis Luzada
    0

    Processing Payment Gateway Response

    Hi TC Team,

    I've mentioned in a previous thread that I am trying to implement a payment gateway that expects an xml instead of hidden fields in the POST process.  I am now able to communicate with that gateway and get their response that is also in xml format.  However, I am unsure/confused what to do at this point.  The payment gateway has two types of implementations and i have chosen the one wherein the gateway does not POST the results back to a url on my server.  I only read the results server-side as an HttpWebResponse.

    My question is how do update/finalize the order based on my gateway's response?  Where am I suppose to do this?  Do I put in server-side code using TC.Data in the Continue url page or is this only used for displaying purposes?

    I did look into the payment providers in bitbucket repository but I believe the callbacks are only executed when the process is executed from TC admin in umbraco and if the gateway can post back to url.  What I would like to know is how do i update the order after the first phase of the purchase (e.g. Auth)?

    Regards,
    Dennis

  • Anders Burla 2560 posts 8256 karma points
    Sep 26, 2012 @ 08:08
    Anders Burla
    0

    Hi Dennis

    It sounds like you have to overwrite the FinalizeAtContinueUrl - this will make Tea Commerce invoke the Callback method at the continue url (Remember to use the "magic" Tea Commerce continue URL). In the callback method you need to verify your data from properly a request/response from the payment gateway and then return the CallbackInfo object so Tea Commerce can Finalize the order.

    Kind regards
    Anders

  • Dennis Luzada 13 posts 43 karma points
    Sep 26, 2012 @ 18:58
    Dennis Luzada
    0

    Hi Anders,

    Okay what I have done (since the gateway is not able to post results back to a url) is to just process the HttpWebResponse (xml) that I got and come up with a CallbackInfo and then invoke .FinalizeOrder(<CallbackInfo>).  Everything appears to work normal, the order appears in the admin and the capture process works as well.

    Before, I tried to make it behave as if a remote site is posting back to my continue url (not overriding FinalizeAtContinueUrl) but I couldn't get the Callback Method to fire up.  I will try and override this bool property and try it again.  I want to stay close to TC's framework as much as possible.

    Thanks again!

    Regards,
    Dennis 

  • Anders Burla 2560 posts 8256 karma points
    Sep 27, 2012 @ 08:55
    Anders Burla
    0

    Hi Dennis

    Sounds great that you got it working! One thing to have in mind when you Finalize the order your self is that some events won't be raised because the Tea Commerce /base method normally does this. So the best way is properly when you have done you post request to the gateway and got a positive result back - redirect the user to the teaCommerceContinueUrl and then overwrite the property I talked about. This should make Tea Commerce finalize the order correctly and also sending the right events :)

    Kind regards
    Anders

  • Dennis Luzada 13 posts 43 karma points
    Oct 01, 2012 @ 15:36
    Dennis Luzada
    0

    Hi Anders,

    Sorry for the late response.  I got tied up with my other stuff.  I will try and implement these revisions that you have suggested and update you if i am successful.  This is what I was worried about.. invoking FinalizeOrder() manually didn't seem right to me because I have a feeling that i'll be bypassing some stuff that should be automatically done by TC framework.  Will update you as soon as I can.  Thank you very much.

    Regards,
    Dennis 

  • Dennis Luzada 13 posts 43 karma points
    Oct 01, 2012 @ 18:50
    Dennis Luzada
    0

    Hi Anders,

    Woooohoooo! It's workin now! I have finally tamed the callback method lololol :D .. you saved my life Anders lol .. TeaCommerce rocks!

    Regards,
    Dennis 

Please Sign in or register to post replies

Write your reply to:

Draft