How are Umbraco Commerce orders handled
# help-with-umbraco
n
Hello, I'm new to Umbraco Commerce and I have a difficult time figuring out how the order flow is. I've come so far as to be able to add products to a basket, (current order), and send the user through a custom payment provider. However, whenever I finish an order.,eg. goes through the payment process, my custom provider handles the async callback returning the payment status as "authorized". The order seems to be finalized and it does end up in the "Orders" list in the backoffice, but the order status is still "Basket". The documentation is very lackluster with regards to how the order process is supposed to be. Currently I use the
BeginPaymentFormAsync
method to render the "go to payment"-form, and it works as expected. But I'm confused with regards to these methods on the order:
InitializeTransactionAsync
and
FinalizeAsync
I've seen numerous examples of them being called, but no information as to when or why. As I can gather from the little information there is, those to methods are being called internally. But since my order status is not changed I guess that is not the case. Thinking about this, am I supposed to update the status myself? How and when should I do that? I'm running Umbraco Commerce 15.0.1 on Umbraco 15.2.0 (and small comment: Naming your product "Umbraco Commerce" when every single search query ends up with results for uCommerce or Tea Commerce is not a good decision.)
Ended up making an
OrderFinalizedNotification
-handler to update the order status. However, it seems like a workaround rather than "the right way".
m
n
It doesn't seem to explain the preferred workflow. From when a user is ready to pay for the order, to the order is actually finalized with a new order status. I'm wasting a ton of time trying to figure this out on my own, and everything I do seems like dirty workarounds (read: Hack).
m
but isn't that the beauty.. it's up to you to define you own.. a payment finalised might not mean moving from basket status for all?
n
As it is not documented, I find it reasonable that a finalized order is does not have a status of "Basket". I also find it weird that this seems to be a thing that most webshops would need, yet a thing everyone has to implement but is not documented very well if at all. "It's up to you to define your own", how?
2 Views