Dynamicweb.eCommerce.Orders Namespace > Order Class > UpdateGatewayResult Method : UpdateGatewayResult(Boolean) Method |
true
[set complete].
'Declaration
Public Overloads Sub UpdateGatewayResult( _ ByVal SetComplete As Boolean _ )
public void UpdateGatewayResult( bool SetComplete )
true
[set complete].class MyPage : System.Web.UI.Page { private void SetOrderComplete(Dynamicweb.eCommerce.Orders.Order order) { //Set complete order.Complete = true; //Remove from stock Dynamicweb.eCommerce.Products.Product.UpdateStock(order, Dynamicweb.eCommerce.Products.Product.OrderStockOperator.Negative); //Remove all earlier gateway problems from this order order.GatewayTransactionProblems.Clear(); //Save all posted info XmlDocument formXML = new XmlDocument(); XmlElement rootNode = formXML.CreateElement("result"); formXML.AppendChild(rootNode); foreach (string formKey in HttpContext.Current.Request.Form.Keys) { try { XmlElement node = formXML.CreateElement(XmlConvert.EncodeName(formKey)); node.InnerText = HttpContext.Current.Request.Form[formKey]; rootNode.AppendChild(node); } catch (Exception ex) { // } } order.GatewayResult = formXML.OuterXml; //Save order.UpdateGatewayResult(true); order.Save(); } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2