I have added a custom fee as commission on my checkout total, All are working fine while checkout but I want to subtract the commission value from grand total for some payment gateway. On My payment gateway I have amount parameter as mentioned below.
Code is $amount = (int) (number_format($mazeOrder->getGrandTotal() * 100, 0, ".", ""));
Here I want to get this custom fee and subtract that form the grand total. How can I get my custom fee on Controller.