Dynamicweb.eCommerce.Orders Namespace > Order Class > UpdateGatewayResult Method : UpdateGatewayResult() Method |
'Declaration
Public Overloads Sub UpdateGatewayResult()
public void UpdateGatewayResult()
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(); 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