The fact you ran to a point using WebDriver than entered the credit card information manually was a good debugging step. That makes it very obvious that something is happening before you get to the credit card page. However, there isn't really enough here for me to discern what might be happening.
The switch statement looks like your framework only supports IE and Firefox. Does it happen in Chrome? This is one possible avenue I would explore.
Another common error is mixing binaries from different versions of Selenium. If you get the IEDriverServer.exe for one version of Selenium but the client bindings (JAR files) for another version of Selenium, it can have unexpected results.
You also note that it fails in both IE and Firefox. But does it fail for the same reason? I know that the released binaries for Selenium are usually one release behind the current Firefox. So if you system automatically updates to the latest version of Firefox, the latest released version of Selenium might not work with it. This means IE might be failing because of the wrong version if IEDriverServer.exe and Firefox is failing because you have the latest version of Firefox.
The final reason which pops to mind is that your framework is doing something which causes the browsers to launch in a state which causes the application to fail. This is the first thing I would check. I'd write a quick and dirty Selenium script which opened the browser, when to the test page then waited. I'd set a breakpoint on the wait, run to breakpoint then try entering the credit card number manually. If that works then I'm pretty sure the problem is in the way your framework is launching the browsers.
Additionally, I would look at the browser console (F12 on IE) and see if there are any javascript errors that might give me insight into why it is failing. Is the failure a message from client side javascript? Or is it making a call to a backend service? If it is making a call to a backend service, is there anything in the service logs which gives insight?
The simplest of scripts to open a browser would be:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
public class Main {
public static void main(String args[]) {
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
Set a breakpoint on the
driver.quit() call. Change the
www.google.com to the URL for your application. Debug to the breakpoint. Use the browser to get to the credit card page and try entering a valid credit card number (if it is using the generic Luhn check you can use 8888 8888 8888 8888).