I have a bit of a problem, when I reach the checout step, my cart is emptied, I integrate with an unsupported gateway provider and before sending the user to this provider, the user is presented to a view, where the user clicks a button and is then send to the provder. But on this step the cart is emptied and this is misleading the customer.
My StartCheckout function holds this code:
public override string StartCheckout(Dynamicweb.eCommerce.Orders.Order order)
{
LogEvent(order, "Starter checkout til RBS");
XMLOrder orderXml = new XMLOrder("dk", "");
string resultXml = orderXml.CreateXML(order);
LogEvent(order, "Result XML: " + resultXml);
string callbackUrl = CreateCallbackUrl(order);
LogEvent(order, "Callback URL: " + callbackUrl);
string urlToPaymentGateway = String.Empty;
try
{
urlToPaymentGateway = orderXml.SendXML(resultXml, order.ID, callbackUrl);
}
catch (Exception e)
{
LogError(order, e.Message + "<br/>" + e.StackTrace + "<br/>" + e.TargetSite);
}
LogEvent(order, "URL til payment gateway: " + urlToPaymentGateway);
return PrintShowPaymentMethodsTemplate(order, urlToPaymentGateway);
}
private string PrintShowPaymentMethodsTemplate(Dynamicweb.eCommerce.Orders.Order order, string urlToPaymentGateway)
{
Dynamicweb.Templatev2.Template template = new Dynamicweb.Templatev2.Template("./RBS/ShowPaymentMethodsTemplate.html");
template.SetTag("url", urlToPaymentGateway);
return template.Output();
}
Is there any way that I can stop the cart from being emptied when showing thix final template to the user?