Pay for order if payment page is closed

lawrence whittemore asked on November 6, 2014 14:56

If an order is created but not paid for is there a way for the user to go back and pay? I see orders in the my account control but and they show as new if they have not been paid for. Is there a way to have them go back and pay?

Recent Answers


Virgil Carroll answered on November 6, 2014 20:48

Just a clarification, do you mean the order was created or items added to the shopping cart? Is your scenario, you are using the invoicing or COD options?

Some more specifics might help with some thoughts.

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on November 6, 2014 20:56

No COD. What I found was I can add items to my shopping cart go through the order process and select credit card, finish the order and go to the payment page. If I click away from that on accident or for any other reason and go back to the cart my products are no longer there. If I go to my account page I can see the order and it shows as new but there is no way to finish the order and make the payment.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on November 7, 2014 04:42

I did a little research and see what you mean, but don't have an easy solution. Someone from support might have a better idea. So I would definitely send them a message and ask for some advice.

The complex solution would be to somehow override to payment screen and be able to bring back the order to pay if the OrderIsPaid field in the COM_Order table (in the Kentico db) is NULL. This would probably require you to instantiate the order container on a page and then process using the payment provider. Would be possible, but not easy to do.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on November 7, 2014 16:00

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;
2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.