Using Drupal 7, Drupal Commerce module.
I have a single page checkout on which the user enters Billing Info, selects one of two payment methods and enters their credit card or E-Check information (using the Commerce NMI payment gateway which utilizes a direct-post method), and ultimately submits the payment. The Review pane is empty and therefore skipped, so the checkout proceeds directly to the Third-party Payment Redirect pane.
My issue: I use a Rule to apply a fee (using Commerce Fees) depending on payment method, but it seems like the payment method isn't being set before the information is sent to the payment gatway--the payment method comparison always evaluates to false.
The rule is recognized after the fact, however, as the fee gets added after the payment has been submitted, resulting in an unpaid balance on the order.
The client is set on a single page checkout process, and so what I need is this:
How can I grab and alter the order information after submitting the checkout form but before the third party redirect fires? This would be very helpful as I would also like to add a custom code to the order ID this way.