I have a $5 fee that gets added to the order total when using lets say "Cash on Delivery". This fee should be removed when switching to "bank transfer". This fee gets removed just fine when I trigger the order review table to update by lets say changing the billing zip code. But I need it to also trigger when selecting a different payment gateway.
Here is my current code:
<script>
$('#payment_method_bacs').on('click', function() {
$( 'body' ).trigger( 'update_checkout' );})
</script>
Any ideas?
Just to make this question somewhat useful for anyone who reads here in the future.. here is the script that ended up working for me. I found the answer here from this helpful guide.
Since this part (payment methods) of the checkout being updated in the background, you should bind the click to "body" such as:
(Untested!)
You can follow this to update cart via AJAX. Here is the link
Here in above code instead of quantity update, Just add your change event of payement Gateway radio button selection