<?php
$page_title = "輸入支付資訊";
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">請選擇您的支出幣種，在備註欄填寫需要給對方的資訊後點擊確認。</p>				
    						
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">收款人帳號</div>
    							<div class="dt-label font14">
    								<?php $this -> echoToAccount(); ?>
    							</div>
    							
    						</div>
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">收款人姓名</div>
    							<div class="dt-label font14">
	    							<?php $this -> dispSiteName(); ?>
	    						</div>
    						</div>
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">内容</div>
    							<div class="dt-label font14">
    								<?php $this -> echoTitle(); ?>
    							</div>
    							
    						</div>
    						<div class="clearfix shelfD">
    							<div class="dt-form font14 f-bold">到帳金額</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">請選擇支出幣種。</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">備註</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">支付確認</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>收款人帳號</th>
	        								<td><span class="w50p"><?php $this -> echoToAccount(); ?></span></td>
	        							</tr>
	        							<tr>
	        								<th>收款人姓名</th>
	        								<td><span class="w50p"><?php $this -> dispSiteName(); ?></span></td>
	        							</tr>
	        							<tr>
	        								<th>内容</th>
	        								<td><span class="w50p"><?php $this -> echoTitle(); ?></span></td>
	        							</tr>
	        							<tr>
	        								<th>到帳金額</th>
	        								<td><span class="w50p" id="spAmount"></span></td>
	        							</tr>
	        							<tr>
	        								<th>匯率</th>
	        								<td><span class="w50p" id="spRate"></span></td>
	        							</tr>
	        							<tr>
	        								<th>支出金額</th>
	        								<td><span class="w50p" id="spDebitAmount"></span></td>
	        							</tr>
	        							<tr>
	        								<th>備註</th>
	        								<td><span class="w50p" id="spMessage"></span></td>
	        							</tr>
	                                 	</tbody>
	                            	</table>
	                            	<div class="clearfix shelfD">
	        	    				<div class="dt250 font14 f-bold">支付貨幣餘額</div>
	        	    				<p class="dt250 font14 f-bold" id="spDebitCurBalance"></p>
	        	    			</div>
	        				    <p class="pt20 pb20 settleInsufficient red f-bold"> 不充足的資金</p>
	        				    <p class="pt20 pb20 settleQuestion"> 您確定要前往您的定居點嗎？</p>
	        				  
	        				    <div class="pt-20 mb10">
	        				    	<a class="conf-settle-pop btn bg-grad px180 m_btn">確認</a>
	        				    	<a class="close-pop btn bg-parent px180 m_btn">取消</a>		  						    	
	        				    </div>
	        				  </div>
	        				</div>
						</div>
					
						<form method="POST" id="authConfirm">
							<div class="col-3">
								<table>
									<tr>
										<th>登入ID</th>
										<td><input type="text" name="user_name" id="user_name" class="w100p" autocomplete="off"></td>
									</tr>
									<tr>
										<th>密碼</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>想了解iWallet？<br>馬上<a href="<?php echo $this -> getAgentCodeURL(); ?>" target="_blank">註冊賬戶</a>!</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">無法處理付款</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">關閉</a>

			</div>
		</div>
	</div>
	<!-- loading popup -->
	<div class="loading-cont">
		<div class="loading-popup">
			<h2 class="mt10 mb-20 blue">請稍等...</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>

