WHMCS Integration Redirect after succesful order

We are trying to set up correctly the WHMCS Integration plugin. Most things work perfectly fine but there are this 2 issues :

1. After a successful order, the redirect to the payment gateway, for the choice “BANK TRANSFER” in WHMCS, is not working correctly, because instead of redirecting you to the Invoice view where it gives you the details, it redirects to the empty cart url. With paypal is working fine. It seems that the issue is with the invoice view template. Wherever there is a payment that has to take you to the invoice view, it doesn’t.

Then from this problem, the second problem is born :

2. When we choose in WHMCS to not use the payment gateway but instead just show the “order completed” page, it redirects correctly and in the order completed page there is a link that sends to the invoiceview.

The problem with the invoiceview is that it’s showing completely messed up since for some reason it’s conflicting with the header and footer of the template that we are using in wordpress.

The WHMCS template is set as Portal and we are using a custom template for wordpress called “Munch”.

The WordPress version is 4.0 and the WHMCS version is the last 5.3.10.

Can you help us solve this issues?

Thank you