Posted on 23/03/2018 08:46:05
Not sure if you already saw this, but i earlier research we found the following information on this issue that might help:
The Authorize.net provider has this:
private new void SetOrderComplete(Order order)
{
if (!order.Complete)
{
// Set complete
order.Complete = true;
order.SaveOrderComplete(true);
}
}
Notice the new keyword (yuck).
Other gateways, such as Stripe, don’t have this method but instead call the one in the base:
SetOrderComplete(order);
Which does this:
Protected Sub SetOrderComplete(ByVal order As Order)
…
If Frontend.KeepOrderInContext Then
order.UpdateCartToOrder(order.ID)
…
Which does this:
Friend Sub UpdateCartToOrder(NewOrderID As String)
…
SetDefaultState()
which does this:
Friend Sub SetDefaultState()
Dim flow As OrderFlow
If String.IsNullOrEmpty(ShopID) Then
flow = OrderFlow.GetDefault()
Else
Dim sh As eCommerce.Shops.Shop = eCommerce.Common.Application.Shop(ShopID)
flow = New OrderFlow(sh.OrderFlowID)
End If
Dim states As OrderStateCollection = OrderState.getDefaultOrderstate(flow.ID)
If states.Count > 0 Then
StateID = states.Item(0).ID
Database.ExecuteNonQuery(String.Format("UPDATE EcomOrders SET OrderStateID = '{0}' WHERE OrderID = '{1}'", StateID, Me.ID), "Ecom.mdb")
NotifyOrderStateChanged()
End If
End Sub
So it seems that in case of Authorize.net no call is made to set the default order state as it overwrites (using new) the method in the base class.