Stock control for PSP Pending orders
ActiveStock was originally designed to deduct the order quantity from stock as soon as the order was 'completed'. In Actinic terms, this means after all customer details have been collected but before payment has been taken. So, of course, orders that are cancelled at the payment stage (in most cases, at the Payment Service Provider's pages) would still be reducing the stock. For some users, this is not a problem as they would like to have the opportunity to speak to their customer and perhaps reinstate the order. For others, though, it is important that stock is not reduced until payment has been taken. So I investigated how to provide this option in ActiveStock and now have a working solution (it is installed on the MumStuff site so that PSP-Pending orders do not affect stock levels).
It works by including a flag in the uploaded stock file that indicates whether the "Allocate stock to PSP Pending orders" option in Actinic's Business settings has been ticked or not. The order script then reads this flag from the file before deciding whether to immediately deduct stock when an order has been completed or wait for an authorization call-back from the PSP. I have been able to test this with Worldpay and PayPal (the 2 PSPs used for MumStuff) but, of course, I cannot test it for all PSPs so I would like some feedback from other users as to how this solution works for other PSPs.
I will shortly change the download to include this new development as well as making the installation process more flexible. This will allow you to pick the 'Site1' folder and also the installation will modfiy the template script files (OrderScript.pl, ActinicOrder.pm and ShoppingCart.pl) rather than the generated files, thus avoiding the possiblity of Actinic overwriting ActiveStock code for things like network setup changes.


0 Comments:
Post a Comment
Please leave your comment or question and I will endeavour to respond as quickly as possible
<< Home