Copied to clipboard

Flag this post as spam?

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


  • Mark V 28 posts 158 karma points
    Jun 29, 2020 @ 11:31
    Mark V
    0

    Finalise Orders just using code

    Hey,

    With our current site setup we're doing all our basket and checkout processing through APIs as we're trying to create a checkout page where the user does not have to leave the page or site. But we're coming to a blockage when we have to finalise an order using the payment form.

    We have plans to create a custom payment provider for Stripe that doesn't include the gateway.

    Do we have a way of processing and finalising orders just using code?

    If not is it something we can expect? As it stands we can extend every part of vendr until it comes to the part where you need to be redirected to a gateway.

    Cheers, Mark V

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jun 29, 2020 @ 12:07
    Matt Brailsford
    100

    Hi Mark

    We should have opened this up recently. Essentially, before you take payment you need to call order.InitializeTransaction() which will assign the order an order number and put it in an intitialized state. Then you can call the Finalize method to mark the transaction as complete once you’ve captured payment.

    You may still need to ensure you assign the appropriate payment provider etc, but those two methods are how a transaction are prepared and finalized.

    If you are using the session manager, you may also need to move the current order to the current finalized order. This is usually handled by the payment providers continue url.

Please Sign in or register to post replies

Write your reply to:

Draft