stng Posted October 22, 2002 Share Posted October 22, 2002 I think it would be really nice to have the order and order_totals_module variables available to a payment module during the pre_process step. This information is available server-side already, so it would 1) save a server round-trip and 2) make more information available. In #1, for example, certain details are often constructed in the process_button() call as hidden fields, which are then available for the pre_process() via a POST. If access were allowed to the order and order_totals_module, all the extra POSTing and reconstruction of variables can be skipped. Really, the whole point of having the hidden fields is for processing in 3rd party submits. In #2, there are some nice pieces of information that would be very tedious to keep passing in. For example, constructing line items for an order to make reconciliation of payments to OSC recordkeeping easier. That way, when you're looking at reports from a 3rd party payment gateway, you have all the details available and can cross-check them. To address #1 and #2 would be quite simple -- in checkout_process.php, we just need to move: $payment_modules->before_process(); To after: $order_total_modules = new order_total; I'm not away of any problems with that move, but if anyone knows better, please let me know. Also, I know Harald is busily revamping payment, so if this change is already in or can be easily patched in with the new stuff, that'd be great. Best Regards, -- stan c",) In a somewhat related note, having the order_id available for authorization would be really nice. This is a more complicated process, as you don't want to process an order and create an order_id before it's authorized. On the other hand, it's nice to have an order_id in the report from the 3rd party payment gateways so that you can match things up. I skirt around the problem by using another table to track transactions and patch in the order_id later, but if someone could think of a better way, that'd be nice to have. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.