Custom module refreshing order total on change of payment method
I'm coding a custom module that i'm sure more of us will enjoy. It's goal is to refresh an order's total as soon as the payment method option of the order is changed, so that additional fees depending on payment methods can be studied live before confirming the order.
I've configured the payment method fieldset to display on the review order page on the checkout process (as shown in the attachment).
I've got 90% of the functionality covered, like so: http://pastebin.com/uAHviRMx
There's one last hurdle to take though.
When selecting a new payment method, this new selection is saved to the order OK. The ajax commands refreshes the two targetted fieldsets, but there's a delay in the refresh of the order's cart. I have to do another select of a different payment method in order to display the result of the previously selected radio button.
What am i missing? Thanks for any help :)