BV Commerce Forum
»
BV Commerce Support
»
How Do I? Questions
»
Updating the Order status when a payment fails.
Rank: Member
Joined: 4/29/2010(UTC) Posts: 256
Thanks: 4 times Was thanked: 11 time(s) in 10 post(s)
|
I am currently writing a downloadable product plugging, and need to handle and errors which could happed if a Paypal account fails, or returns Inprocess such as succeded. When this happends the Order remains with a Status of Shopping Cart and isPlaced remains at 0 in the database inspite me add the following code once my exception is thrown. Below is my code to update the LineItems within the Order and update the order iteslef. the function returns true when BVSoftware.Bvc5.Core.Orders.Order.Update(context.Order); is called. however the database remains unchanged. Any ideas? Code: BVSoftware.Bvc5.Core.Orders.OrderStatusCode c = BVSoftware.Bvc5.Core.Orders.OrderStatusCode.FindByBvin(WebAppSettings.OrderStatusCodeOnHold); if (c != null) { foreach (BVSoftware.Bvc5.Core.Orders.LineItem objLineItem in context.Order.Items) { objLineItem.ShippingStatus = BVSoftware.Bvc5.Core.Orders.OrderShippingStatus.Unshipped; objLineItem.QuantityShipped = 0;
BVSoftware.Bvc5.Core.Orders.LineItem.Update(objLineItem); }
context.Order.StatusCode = c.Bvin; context.Order.StatusName = c.StatusName; saved = BVSoftware.Bvc5.Core.Orders.Order.Update(context.Order); }
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.