Copied to clipboard

Flag this post as spam?

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


  • Mark 119 posts 252 karma points
    May 06, 2014 @ 16:55
    Mark
    0

    Finalizing an order from .net API

    Guys,

    What's the easiest way to finalize an order from the .net api?

    For various reasons, I need to set a property on an order before finalizing it, so can't just use "TC.GeneratePaymentForm()", and I don't want to rely on javascript being enabled for the functionality.

    Basically, long story short, I'm using a surface controller provide a button to finalize the order having set a property on the order (I'm implementing a saved basket feature driven by changing the status on an order based on a property).

    Any help would be appreciated, I'll provide more details if needed.

    Thanks!

    Mark

  • Anders Burla Johansen 2560 posts 8256 karma points
    May 07, 2014 @ 11:52
    Anders Burla Johansen
    100

    Can order.Finalize be used? :)

    Kind regards
    Anders

  • Mark 119 posts 252 karma points
    May 07, 2014 @ 12:02
    Mark
    0

    Yes.. I actually started playing with that a couple of hours ago. Looks like it will do the job just fine, now I just have to fix all of the other bits that go along with it.. :-)

    Thanks for the heads up though, I think I'd be going mad if I hadn't spotted it by now, thank goodness for fresher morning eyes!

    I may yet be back here with more issues along the same lines, I'm trying to move orders from a saved basket state (finalized with a 'saved basket' status and a 'saved basket' payment method) to a placed order with a 'order placed' status and 'order placed' payment method. The same surface also has to handle new orders as well though, so that has thrown up a number of values which shouldn't be null etc.

    Onwards & upwards!

    Mark

  • Mark 119 posts 252 karma points
    May 07, 2014 @ 15:48
    Mark
    0

    Well, I got this working, was easy in the end, just a little confusing when things weren't initially working.

    order.Finalize was the function I was after, it just wasn't working because I was passing an order through to my controller. Once I changed it to have an order ID passed in as a string and fetched the order using that and the OrderService api all started to work as expected and I could change PaymentMethods and OrderStatuses just fine.

    Thanks for the help.

    Mark

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies