<%@page contentType="text/html; charset=ISO-8859-1" pageEncoding="UTF-8" language="java" %>
<%@page import="java.util.* , java.text.*"%>
<%		
	String dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
	String uniqueOrderId  = new SimpleDateFormat("ddMMYYYY").format(new Date())+System.currentTimeMillis(); 
	System.out.println("Merchant's Unique Order Number : "+uniqueOrderId);
%>

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>

<html>
	 <HEAD>
    	<TITLE>Merchant Test Page</TITLE>
    	<STYLE type='text/css'>
            H1       { font-family:Arial,sans-serif; font-size:24pt; color:#08185A; font-weight:100}
            H2.co    { font-family:Arial,sans-serif; font-size:24pt; color:#08185A; margin-top:0.1em; margin-bottom:0.1em; font-weight:100}
            H3.co    { font-family:Arial,sans-serif; font-size:16pt; color:#000000; margin-top:0.1em; margin-bottom:0.1em; font-weight:100}
            body     { font-family:Verdana,Arial,sans-serif; font-size:10pt; color:#08185A ;background-color:#FFFFFF }
            P        { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#FFFFFF }
            A:link   { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#08185A }
            A:visited{ font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#08185A }
            A:hover  { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#FF0000 }
            A:active { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#FF0000 }
            TD       { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#08185A }
            TD.red   { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#FF0066 }
            TD.green { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#00AA00 }
            TH       { font-family:Verdana,Arial,sans-serif; font-size:10pt; color:#08185A; font-weight:bold; background-color:#E1E1E1; padding-top:0.5em; padding-bottom:0.5em}
            input    { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#08185A; background-color:#E1E1E1; font-weight:bold }
            select   { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#08185A; background-color:#E1E1E1; font-weight:bold; width:463 }
            textarea { font-family:Verdana,Arial,sans-serif; font-size:8pt; color:#08185A; background-color:#E1E1E1; font-weight:normal; scrollbar-arrow-color:#08185A; scrollbar-base-color:#E1E1E1 }
        </STYLE>
    </HEAD>

	<body>
    	<form action="merchantRequestProcessor.jsp" method="post" accept-charset="ISO-8859-1">
    
    		<!-- get user input -->
    		<table width='65%' align="center" border='2' cellpadding='2' bgcolor='#C1C1C1'>
    			<tr>
    				<td bgcolor='#33EEFF' width='100%' align="center" >
    				<h2 class='co'>&nbsp;MERCHANT REQUEST PARAMETERS</h2>
    				</td>
    			</tr>
    		</table>
    		
    		<br>
    		
        	<TABLE width="65%" align="center" border="2" cellpadding='2' cellspacing='3'>	        	
                
                <tr bgcolor="#84FF33">
            		<td colspan="2" height="25"><p><strong>&nbsp;<font color="black">Fields below are the Request Parameters required by 1Pay - </font></strong></p></td>
        		</tr>
             	
             	<tr>
               		<td colspan="2">&nbsp;&nbsp;</td>
               	</tr>
               	
                <tr>
              	 	<td>
              	 		Merchant Id: <font color="red">*</font>
              	 	</td>
              	 	<td>
              	 		<input class="textbox" type="text" name="merchantId" id="merchantId" value="M0002" > Enter you <font color="red">Test/Live</font> Merchant ID
					</td>
				</tr>
                
                <tr>
                	<td>
                		API Key : <font color="red">*</font>
                	</td>
                	<td>
                		<input class="textbox" type="text" name="apiKey" id="apiKey" value="jpuT6032" > Enter your <font color="red">Test/Live</font> API Key
                	</td>
              	 </tr>
              	 
              	 <tr>
              	 	<td>
              	 		Merchant Order No. : <font color="red">*</font>
              	 	</td>
              	 	<td>
              	 		<input class="textbox" type="text" name="txnId" id="txnId" value="<%=uniqueOrderId%>" > Must be Unique for every Transaction
					</td>
				</tr>
              	
              	<tr>
              		<td>
              			Amount(Rs.) : <font color="red">*</font>
              		</td>
              		<td>
              			<input class="textbox"type="text" name="amount" id="amount" value="10.00" >  Must be Decimal Value ( 2 decimal point )
					</td>
				</tr>								            	               	 
              	
              	<tr>
              		<td>
              			Transaction Date Time: <font color="red">*</font>
              		</td>
              		<td>
              			<input class="textbox"type="text" name="dateTime" id="dateTime" value = "<%=dateTime%>" >
              		</td>
              	</tr>
             	
             	<tr>
             		<td>
             			Customer Mail ID : <font color="red">*</font>
             		</td>
             		<td>
             			<input class="textbox"type="text" name="custMail" id="custMail" value="test@test.com" > 
					</td>
				</tr>
				
				<tr>
					<td>
						Customer Mobile No. : <font color="red">*</font>
					</td>
					<td>
						<input class="textbox"type="text" name="custMobile" id="custMobile" value="9876543210" > 
					</td>
				</tr>               	              
              	
              	<tr>
              		<td>
              			UDF1 : <font color="red">*</font>
              		</td>
              		<td>
              			<input class="textbox"type="text" name="udf1" id="udf1" value="NA" > Shipping address of the customer
					</td>
				</tr>
              	
              	<tr>
              		<td>
              			UDF2 : <font color="red">*</font>
              		</td>
              		<td>
              			<input class="textbox"type="text" name="udf2" id="udf2" value="NA" > Billing address of the customer 
					</td>
				</tr>              	             	             
             	 
             	<tr>
                	<td>
                		Merchant Return URL : <font color="red">*</font>
                	</td>
                	<td>
 						<input class="textbox1"type="text" name="returnURL" id="returnURL" value="www.merchantUrl.com/merchantResponseProcessor.jsp"> Enter URL where Response will be redirected
 					</td>
 				</tr>
 				
 				<tr>
                	<td>
                		Multipart Settlement : <font color="red">*</font> 
                	</td>
                	<td>
 						<input class="textbox1"type="text" name="isMultiSettlement" id="isMultiSettlement" value="0"> 0(False)/1(True)
 					</td>
 				</tr>
 				
 				<tr>
              		<td>
              			Product ID : <font color="red">*</font>
              		</td>
    				<td>
    					<input class="textbox"type="text" name="productId" id="productId" value="DEFAULT" > IF Multipart Settlement Value '0' then 'DEFAULT' ELSE 'PRODUCTID1~AMOUNT1|...|PRODUCTIDn~AMOUNTn'
    				</td>
    			</tr>  
    			
    			<tr>
              		<td>
              			Channel ID : <font color="red">*</font>
              		</td>
              		<td>
              			<input class="textbox" type="text" name="channelId" id="channelId" value="0" > 
					</td>
				</tr>
				
    			<tr>
					<td>
						Transaction Type: <font color="red">*</font>
					</td>
					<td>
						<input class="textbox"type="text" name="txnType" id="txnType" value="DIRECT" > DIRECT / REDIRECT
					</td>
              	</tr>
              	
              	<tr>
              		<td>
              			UDF3 :
              		</td>
              		<td>
              			<input class="textbox"type="text" name="udf3" id="udf3" value="NA" > 
					</td>
				</tr> 
				<tr>
              		<td>
              			UDF4 :
              		</td>
              		<td>
              			<input class="textbox"type="text" name="udf4" id="udf4" value="NA" > 
					</td>
				</tr> 
				<tr>
              		<td>
              			UDF5 :
              		</td>
              		<td>
              			<input class="textbox"type="text" name="udf5" id="udf5" value="NA" > 
					</td>
				</tr>    				               
               	
               	<tr>
               		<td colspan="2">&nbsp;&nbsp;</td>
               	</tr>
               	
               	<tr bgcolor="#84FF33">
            		<td colspan="2" height="25"><p><strong>&nbsp;<font color="black">Proper Values of below field are required only if Txn Type is</font> <font color="red">"REDIRECT"</font> <font color="black">else default value is "NA".</font> </strong></p></td>
        		</tr>
        		
        		<tr>
               		<td colspan="2">&nbsp;&nbsp;</td>
               	</tr>
               	
               	<tr>
              		<td>
              			Instrument ID :
              		</td>
              		<td>
              			<input class="textbox"type="text" name="instrumentId" id="instrumentId" value="NA" > NB/CC/DC for Txn Type "REDIRECT"
					</td> 
				</tr> 
				
				
				
				<tr>
               		<td>
               			Card Details :
               		</td>
               		<td>
               			<input class="textbox"type="text" name="cardDetails" id=""cardType"" value="NA" > For CC/DC : "CARDNAME|CARDNO|CVV|EXPIRY" or For NB : Bank specific code provided by 1Pay
               		</td>
              	</tr>  
				
               	<tr>
               		<td>
               			Card Type :
               		</td>
               		<td>
               			<input class="textbox"type="text" name="cardType" id=""cardType"" value="NA" > For CC/DC : Visa/Mastercard/Rupay/Amex etc...
               		</td>
              	</tr>              	              	 
            	
            	<tr>
            		<td colspan="2">&nbsp;&nbsp;</td>
            	</tr>
            	
            	<tr>
               		<td colspan="2" align="center" >                	
                		<input type = "submit"  value="Submit Request"/>
                	</td>
                </tr>

        	</TABLE>

    	</form>

	</body>

</html>