You have to customize the my orders webpart so that if the order failed, you send them to the payment page url with the appropriate hash.
Here is some example code to place in your myorders - gridOrders externaldatabound event:
case "invoice":
int orderid = ValidationHelper.GetInteger(Convert.ToInt32(parameter), 0);
if (orderid > 0)
{
OrderInfo oi = OrderInfoProvider.GetOrderInfo(orderid);
if (oi.OrderIsPaid)
{
//return invoice because order is paid
return "<a target=\"_blank\" href=\"" + URLHelper.ResolveUrl("~/CMSModules/Ecommerce/CMSPages/GetInvoice.aspx?orderid=" + ValidationHelper.GetInteger(parameter, 0)) + "\">" + GetString("general.view") + "</a>";
}
else
{
//dealing with credit card transaction
string paymentPageURL = "~/order-payment";
ShoppingCartInfo ShoppingCart = ShoppingCartInfoProvider.GetShoppingCartInfoFromOrder(oi.OrderID);
string orderHash = ShoppingCart.GetHashCode().ToString();
WindowHelper.Add(orderHash, oi.OrderID);
return "<a href=\"" + paymentPageURL + "?o=" + orderHash + "\">Make Payment</a>";
}
}
else
{
return "In Progress";
}
break;