Completed the implementation for NMI Gateway