<?php
$page_title = "Payment Request Form";
include_once('./config.php');
include_once('template/base_head_API.php');
?>
<aside id="colLeft" class="login api_aside">
	<h1><a href="/en/menu"><img src="../img/logo.png" alt="iWallet"></a></h1>
	<h2></h2>
	<div class="sideLogin"></div>
</aside>
	<div id="colMain" class="nonav">
		<div class="mainIn">
		<?php /* include_once('template/base_nav_logout.php'); */ ?>
			<header class="api_header">
				<a href="/en/menu"><img src="../img/logo.png" alt="iWallet"></a><nav id="navbar">
					&nbsp;
				</nav>
			</header>
			<div class="row_iwl">
				<div class="column_iwl">
					<article class="brd_div">
						<div class="article-heading">
							<h2><?php echo $page_title; ?></h2>
						</div>
						
						<div class="pleft40">
    						<p class="mb30">Please choose your payout currency</p>				
    						
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">Requestee Account Number</div>
    							<div class="dt-label font14">
    								<?php $this -> echoToAccount(); ?>
    							</div>
    							
    						</div>
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">Requestee Name</div>
    							<div class="dt-label font14">
	    							<?php $this -> dispSiteName(); ?>
	    						</div>
    						</div>
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">Product</div>
    							<div class="dt-label font14">
    								<?php $this -> echoTitle(); ?>
    							</div>
    							
    						</div>
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">Amount Received</div>
    							<div class="dt-label font14">
    								<?php $this -> echoCurrency(); ?> <?php $this -> echoAmount(); ?>
    							</div>
    							
    						</div>
    						<div class="clearfix shelfD details_cont">
    							<div class="dt-form font14 f-bold " id="bg-cont">Payout Currency</div>
        						<select id="debit_currency" name="debit_currency" class="px100 ArrowNone">
        							<?php $this -> dispCurrency(); ?>
        						</select>&emsp;		
    						</div>
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">Message</div>
    							<textarea rows="3" cols="40" id="message_field" name="message" class="w100p lalign"></textarea>
    						</div>
    						
							<div class="dt250 noborder"></div>
						</div>
					</article>
				</div>
				<div class="column_iwl ">
					<!-- 
					<p class="red mt20"><span class="fa fa-times-circle fa-lg mt"></span>
						 Please confirm the payment details first.
					</p>
					 -->
					
					<div id="loginAPI">
						<div class="overlay-cont">
							<div class="popup-overlay">
	        				  	<div>
	        				    	<h1 class="mt30">Settlement Confirmation</h1>
	        				    	<div class="article-heading mt20">
	        							<h2><?php echo $page_title; ?></h2>
	        						</div>
	        						<table class="table col bdr default odd withdrawT fontM mb20 ma90sp">
	                            		<tbody>
	        							<tr>
	        								<th>Requester Account Number</th>
	        								<td><span class="w50p" id="spRequesterAcc"></span></td>
	        							</tr>
	        							<tr>
	        								<th>Requester Name</th>
	        								<td><span class="w50p" id="spRequesterName"></span></td>
	        							</tr>
	        							<tr>
	        								<th>Requestee Account No.</th>
	        								<td><span class="w50p"><?php $this -> echoToAccount(); ?></span></td>
	        							</tr>
	        							<tr>
	        								<th>Requestee Name</th>
	        								<td><span class="w50p"><?php $this -> dispSiteName(); ?></span></td>
	        							</tr>
	        							<tr>
	        								<th>Product</th>
	        								<td><span class="w50p"><?php $this -> echoTitle(); ?></span></td>
	        							</tr>
	        							<tr>
	        								<th>Amount to pay</th>
	        								<td><span class="w50p" id="spAmount"></span></td>
	        							</tr>
	        							<tr>
	        								<th>Rate</th>
	        								<td><span class="w50p" id="spRate"></span></td>
	        							</tr>
	        							<tr>
	        								<th>Debit Amount</th>
	        								<td><span class="w50p" id="spDebitAmount"></span></td>
	        							</tr>
	        							<tr>
	        								<th>Message</th>
	        								<td><span class="w50p" id="spMessage"></span></td>
	        							</tr>
	                                 	</tbody>
	                            	</table>
	                            	<div class="clearfix shelfD">
	        	    				<div class="dt250 font14 f-bold">Payout Currency Balance</div>
	        	    				<p class="dt250 font14 f-bold" id="spDebitCurBalance"></p>
	        	    			</div>
	        				    <p class="pt20 pb20 settleInsufficient red f-bold"> Insufficient Funds</p>
	        				    <p class="pt20 pb20 settleQuestion"> Are your sure you want to proceed to your settlement?</p>
	        				  
	        				    <div class="pt-20 mb10">
	        				    	<a class="conf-settle-pop btn bg-grad px180 m_btn">Confirm</a>
	        				    	<a class="close-pop btn bg-parent px180 m_btn">Cancel</a>		  						    	
	        				    </div>
	        				  </div>
	        				</div>
						</div>
					
						<form method="POST" id="authConfirm">
							<div class="col-3">
								<table>
									<tr>
										<th>Your Email Address</th>
										<td><input type="text" name="user_name" id="user_name" class="w100p" autocomplete="off"></td>
									</tr>
									<tr>
										<th>Password</th>
										<td><input type="password" name="password" id="password" class="w100p" autocomplete="new-password"></td>
									</tr>
								</table>
							</div>
							<div class="col-1">
			                    <div class="sign-up-container">
			                        <div>New to iWallet?&nbsp; <a href="<?php echo $this -> getAgentCodeURL(); ?>" target="_blank">Sign Up</a> for a new account now!</div>   
			                    </div>
			       		 	</div>	
							<input type="submit" value="Settle" class="btn bg-grad px80" >
						</form>
						
						<form id="acForm" action="" method="POST">
    						<input type="hidden" value="<?php $this -> echoSignature(); ?>" id="signature" name="signature" />
        					<input type="hidden" value="<?php $this -> echoToAccount(); ?>" id="user_account" name="user_account" />
        					<input type="hidden" value="<?php $this -> echoCurrency(); ?>" id="currency" name="currency" />
        					<input type="hidden" value="<?php $this -> echoAmount(); ?>" id="amount" name="amount" />
        					<input type="hidden" value="<?php $this -> echoTitle(); ?>" id="title" name="title" />
        
        					<input type="hidden" value="<?php $this -> echoSuccessUrl(); ?>" name="success_url" />
        					<input type="hidden" value="<?php $this -> echoFailUrl(); ?>" name="fail_url" />
        					<input type="hidden" value="<?php $this -> echoReturnUrl(); ?>" name="return_url" />
        					<input type="hidden" value="<?php $this -> echoPNum(); ?>" name="p_num" />
        					<input type="hidden" value="<?php $this -> echoFormName(); ?>" name="formName" />
        					
        					<input type="hidden" value="" id="type" name="type" />
        					<input type="hidden" value="" id="uniqueSubmission" name="uniqueSubmission" />
        					<input type="hidden" value="" id="debit_currency_ac" name="debit_currency" />
        					<input type="hidden" value="" id="from_account" name="from_account" />
        					<input type="hidden" value="" id="message" name="message" />
        					<input type="hidden" value="" id="rate" name="rate" />
        
        					<?php $this -> echoParams(); ?>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- Error pop up -->
	<div class="error-cont" >
		<div class="error-popup">
			<h2 class=" red mb20">Payment cannot be processed</h2>
			<div id="errorTraces">

				<p class="red mt10"><span class="fa fa-times-circle fa-lg mt"></span> Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
				<p class="red mt10"><span class="fa fa-times-circle fa-lg mt"></span> Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
				<p class="red mt10"><span class="fa fa-times-circle fa-lg mt"></span> Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>

			</div>
			<div class="pt40 calign" >
				<a class="error-close btn bg-parent px180 m_btn">Close</a>

			</div>
		</div>
	</div>
	<!-- loading popup -->
	<div class="loading-cont">
		<div class="loading-popup">
			<h2 class="mt10 mb-20 blue">Please wait...</h2>
		  	<div class="mt20 loader"></div>
		</div>
	</div>
</div>
<!-- /ãƒ¡ã‚¤ãƒ³ã‚«ãƒ©ãƒ  -->
</div>

<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/settlement.js"></script>
</body>
</html>

