Update gateway test case to support optional purchase() method