BV Commerce Forum
»
BV Commerce Support
»
General Support
»
How To Automatically Capture Funds After Order Has Shipped
Rank: Member
Joined: 6/9/2011(UTC) Posts: 12
|
I've built a custom workflow that integrates with an order fulfillment company's API, which is responsible for shipping the order. When an order is placed it automatically creates an order using the API. A timer built into Global.asax periodically queries the API to check if any orders have been shipped. We would like to capture funds AFTER the order has shipped instead of when the order is placed. Is there a way to do this from within the workflow task? We are currently using Authorize.Net as the payment processor. BV version 5.
On a possibly related note: When I automatically update an order from within the custom workflow and set its status to "Shipped", the icon in the Order Manager gets updated. However, if I go into the order I always see something along the lines of "In Process / Paid / Unshipped". I've also tried updating each package / item in the order by setting them to shipped. This doesn't seem to fix the issue. The only way I can get the View Order page to correctly display that the order has shipped is by manually setting it to shipped in the Order Shipping page.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Mike,
Yes, you should be able to capture the funds from a workflow.
Regarding the order status issue, I've seen this before and believe it is a bug. I don't recall how we resolved it, though. It looks like your options are to either submit this to BV as a bug or dig into the code and fix it. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 4/29/2010(UTC) Posts: 256
Thanks: 4 times Was thanked: 11 time(s) in 10 post(s)
|
As Aaron as said you just need to move the workflow around a little bit and you should be able to achive your goal.
"On a possibly related note: When I automatically update an order from within the custom workflow and set its status to "Shipped", the icon in the Order Manager gets updated. However, if I go into the order I always see something along the lines of "In Process / Paid / Unshipped". I've also tried updating each package / item in the order by setting them to shipped. This doesn't seem to fix the issue. The only way I can get the View Order page to correctly display that the order has shipped is by manually setting it to shipped in the Order Shipping page."
I had the same problem. From memory if you check the shipping page of the order and then go back it updates?
|
|
|
|
Rank: Member
Joined: 6/9/2011(UTC) Posts: 12
|
Aaron: Do you happen to know how to capture the funds? I would have assumed it would be somewhere in orderObject.Payments.<Call To Capture Funds>() . It would be preferable if I could also capture funds outside of the workflow (so that the timer can just call up some code).
Steve: The weird thing about this bug is that the Order Manager says shipped, the View Order page says UNshipped, but if I go into View Order and update something on the page (for example, change "In Process" to "Payment Pending" and then back to "In Process") the Order Manager will update to UNshipped.
Thank you both for all of your help!
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: "MikeSmartz" Aaron: Do you happen to know how to capture the funds? I would have assumed it would be somewhere in orderObject.Payments.<Call To Capture Funds>() . It would be preferable if I could also capture funds outside of the workflow (so that the timer can just call up some code).
Not without digging into the code. You should be able to see how BV is doing normally and then just put that code into your workflow (or wherever else you need it). |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 6/9/2011(UTC) Posts: 12
|
I was able to find the code for this and get it working for my own purposes. The code was located in BVAdmin/Orders/Default.aspx.vb: CaptureOrder() I'm still unable to get the Order View page to display the product as Shipped. After searching through the code it looks like it could be something along the lines of Code: Dim context As New BusinessRules.OrderTaskContext context.Order = orderToUpdate context.UserId = orderToUpdate.UserID context.Inputs.Add("bvsoftware", "PreviousShippingStatus", previousShippingStatus.ToString()) BusinessRules.Workflow.RunByBvin(context, WebAppSettings.WorkflowIdShippingChanged)
but this didn't seem to work either.
|
|
|
|
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.