Page 1 of 1
Updating OrderStatusId
Posted: Tue Jun 01, 2010 4:26 pm
by Radiatorman
When an order is placed and the authorization fails, the user is redirected to PayMyOrderPage via the HandleFailedPayments property. The order is thus assigned an OrderStatusId = 4 (or "Problem"). When purchaser enters in correct payment information and the order is successfully completed, the OrderStatusId does not update (it remains 4 instead of 1). Shouldn't the order be updated to OrderStatusId = 1 (or "Payment Pending")? If not, where can I go to make this update?
From what I can tell, the store looks to see what the old OrderStatusId is and then updates the order with that old information.
Thanks in advance for any help!
Re: Updating OrderStatusId
Posted: Wed Jun 02, 2010 4:00 am
by s_ismail
did u customize your original code anywhere in your store?
Re: Updating OrderStatusId
Posted: Wed Jun 02, 2010 11:18 am
by Radiatorman
Yes, but nowhere in those sections.
Re: Updating OrderStatusId
Posted: Thu Jun 03, 2010 5:52 am
by mazhar
Radiatorman wrote:When an order is placed and the authorization fails, the user is redirected to PayMyOrderPage via the HandleFailedPayments property. The order is thus assigned an OrderStatusId = 4 (or "Problem"). When purchaser enters in correct payment information and the order is successfully completed, the OrderStatusId does not update (it remains 4 instead of 1). Shouldn't the order be updated to OrderStatusId = 1 (or "Payment Pending")? If not, where can I go to make this update?
From what I can tell, the store looks to see what the old OrderStatusId is and then updates the order with that old information.
Thanks in advance for any help!
Give a try and edit your ConLib/PayMyOrderPage.ascx.cs file and locate following code
Code: Select all
_Order = OrderDataSource.Load(_OrderId);
and update it as below
Code: Select all
_Order = OrderDataSource.Load(_OrderId,false);
save it and test again.
Re: Updating OrderStatusId
Posted: Thu Jun 03, 2010 11:29 am
by Radiatorman
That didn't work for me. What I ended up doing was finding the code below:
Code: Select all
bool result = PayOrder(e.Payment);
and then adding the following just after it:
Code: Select all
if (result)
{
_Order = OrderDataSource.Load(_OrderId);
OrderDataSource.UpdateOrderStatus(_Order, 1);
}
That way if the payment was successful, OrderStatusId is forced to update to being successful too