public boolean validatePayment(Transaction transaction) {
		String paymentType = transaction.getPayment().toString();
		boolean paid = false;
		
		switch (paymentType) {
		
		case "CashPayment":
			registerUI.setCashPayment();
			break;
		case "CreditPayment":
			registerUI.setCreditPayment();
			paid = transaction.getPayment().initiatePayment();
			
			if (paid) {
				registerUI.setCreditCardLabel("Card Accepted");
				registerUI.setAmountDue(new BigDecimal(0));
				registerUI.resetUI();
				this.exitKiosk.openGate();	
			} else {
				registerUI.setCreditCardLabel("Card Declined");
			}
			
			break;
		case "AccountPayment":
			registerUI.setAccountPayment();
			paid = transaction.getPayment().initiatePayment();
			
			if (paid) {
				// marks a account as paid and opens gate
				registerUI.setAccountNumberLabel("Paid on Account");
				registerUI.setAmountDue(new BigDecimal(0));
				registerUI.resetUI();
				this.exitKiosk.openGate();	
			} else {
				registerUI.setAccountNumberLabel("Account Not Found");
			}
			
			// set the account paid field to license
			break;
		}
		
		return (paid);
	
	}