<div id="content">
  <div class="contentheader"><?php getLanguage(892)?></div>
  <?php readparameter(serializeHmTabs); ?>    
  <div class="clear"></div>
  <center>
    <?php
    switch(SESSION_MESSAGE)
    {
      case 1: echo('<p class="message"><b>'.getLanguage(129, 1).'</b>'.getLanguage(217, 1).'</p>'); break; 
      case 2: echo('<p class="error"><b>'.getLanguage(40, 1).'</b>'.getLanguage(828, 1).'</p>'); break;}
      unset($_SESSION['msg']);
    ?>
    <script type="text/javascript">
		  function toggleDiv(divId) {
		    $("#"+divId).toggle();
		  }
	  </script>
    <div class="admindiv">
      <div class="admindivheader" style="position:relative">
      		<?php getLanguage(902)?> 
      		<a onclick="javascript:toggleDiv('sitesettings');" class="streamrefresh" style="width:150px;cursor:pointer"><?php getLanguage(913)?></a>
      </div>
          <center>
            <form method="post" action="administration/payments.php" id="sitesettings" style="display:none">
            	<br>
            	<p style="border: solid 1px rgb(122, 122, 122);background-color: #E4E4E4;margin: 20px;padding: 20px;"><i class="fa fa-exclamation fa-3x"></i><br><?php getLanguage(914)?></p>
              <div class="row">
                <div class="col-md-4 text-right">
                  <label for="enabled"><?php getLanguage(903)?></label>
                </div>
                <div class="col-md-8 text-left">
                  <select name="enabled" id="enabled">
                    <option value="0" <?php if(PAYMENT_ENABLED==0) echo 'selected="selected"'; ?>><?php getLanguage(905)?></option>
                    <option value="1" <?php if(PAYMENT_ENABLED==1) echo 'selected="selected"'; ?>><?php getLanguage(904)?></option>
                  </select><br>
                  <span class="supporting"><i><?php getLanguage(906)?></i>.</span>
                </div>
              </div>
              <div class="row">
                <div class="col-md-4 text-right">
                  <label for="mode"><?php getLanguage(901)?></label>
                </div>
                <div class="col-md-8 text-left">
                  <select name="mode" id="mode">
                    <option value="sandbox" <?php if(PAYMENT_MODE=='sandbox') echo 'selected="selected"'; ?>>Sandbox</option>
                    <option value="live" <?php if(PAYMENT_MODE=='live') echo 'selected="selected"'; ?>>Live</option>
                  </select><br>           
                    <span class="supporting">
                      <i><?php getLanguage(907)?></i>
                      <br>
                      <span onclick="javascript:toggleDiv('paypal_info');" style="color:blue;text-decoration:underline;cursor:pointer">Creating Paypal Sandbox Account</span>
                    </span>
                </div>
              </div>
              <div id="paypal_info" style="display:none;border: solid 1px rgb(122, 122, 122);background-color: #E4E4E4;margin: 20px;padding: 20px;">
                <br>
                <span style="font-weight:700">Creating Paypal Sandbox Account</span>
              		<ul style="text-align:left">
        						<li>Obtain API Credentials from a Sandbox Test Account Go to <a href="https://developer.paypal.com/" target="_blank">https://developer.paypal.com/</a></li>
        						<li>Login to your PayPal’s Sandbox Test environment account. (or create an account if you don’t have one.)</li>
        						<li>Select Test Accounts.</li>
        						<li>Click the Create Test Accounts link.</li>
        						<li>Select Test Accounts.</li>
        						<li>Choose Seller for the Account Type.</li>
        						<li>Change the password to something you can remember and make a note of it.</li>
        						<li>Note: The Login Email is a pseudo-randomized address, which is based on the login email address you used to create your sandbox account. Credit card and bank account numbers are also generated randomly.</li>
        						<li>Click Create Accounts when you are finished modifying the account.</li>
        						<li>From the Test Accounts list, select the account you created and click Enter Sandbox.</li>
        						<li>Log into the account.</li>
        						<li>Click My Account.</li>
        						<li>Click Profile.</li>
        						<li>Under Account Information, click API Access.</li>
        						<li>Click Request API Credentials.</li>
        						<li>Click API Signature.</li>
        						<li>Click the Agree checkbox.</li>
        						<li>Click Submit.</li>
        						<li>Make a note or copy/paste these fields into the PayPal Shopping Cart Integration Wizard Generate Code form:
        							<ul>
        								<li>API username
        								<li>API password
        								<li>API signature</li>
        							</ul>
        						</li>
        						<li>You can always retrieve these credendials from the Sandbox Test Environment by selecting API Credentials to view the API credentials you have created for test accounts.</li>
        					</ul>
                <br>
              </div>
              <div class="row">
                <div class="col-md-4 text-right">
                  <label for="apiusername"><?php getLanguage(908)?></label>
                </div>
                <div class="col-md-8 text-left">
                  <input type="text" name="apiusername" id="apiusername" value="<?php echo PAYMENT_APIUSERNAME; ?>" size="30"><br>
                  <span class="supporting">
                    <span onclick="javascript:toggleDiv('paypal_info2');" style="color:blue;text-decoration:underline;cursor:pointer">Getting Paypal API username and Password</span>
                  </span>
                </div>
              </div>
             	<div id="paypal_info2" style="display:none;border: solid 1px rgb(122, 122, 122);background-color: #E4E4E4;margin: 20px;padding: 20px;">
                <br>
              	<span style="font-weight:700">Getting Paypal API username and Password</span>
              		<ul style="text-align:left">
        						<li> Once you are logged in to <a href="https://paypal.com/" target="_blank">your Paypal account</a>. Click profile under My Account Tab, Click selling tools on the left, and then click update API access.</li>
        						<li>On the next page click Request API credentials.</li>
        						<li>Select API Signature on the next page and submit.</li>
        						<li>That’s it, you should find your API credential information, which can be used in all your Paypal store apps.</li>
        					</ul>
                <br>
              </div> 
              <div class="row">
                <div class="col-md-4 text-right">
                  <label for="apipassword"><?php getLanguage(909)?></label>
                </div>
                <div class="col-md-8 text-left">
                  <input type="text" name="apipassword" id="apipassword" value="<?php echo PAYMENT_APIPASSWORD; ?>" size="30"><br>
                  <span class="supporting"><?php getLanguage(909)?></span>
                </div>
              </div>  
              <div class="row">
                <div class="col-md-4 text-right">
                  <label for="apisignature"><?php getLanguage(910)?></label>
                </div>
                <div class="col-md-8 text-left">
                  <input type="text" name="apisignature" id="apisignature" value="<?php echo PAYMENT_APISIGNATURE; ?>" size="30"><br>
                  <span class="supporting"><?php getLanguage(910)?></span>
                </div>
              </div>
              <div class="row">
                <div class="col-md-4 text-right">
                  <label for="currencycode"><?php getLanguage(911)?></label>
                </div>
                <div class="col-md-8 text-left">
                  <input type="text" name="currencycode" id="currencycode" value="<?php echo PAYMENT_CURRENCYCODE; ?>" size="30"><br> 
                  <span class="supporting"><?php getLanguage(911)?></span>
                </div>
              </div>
              <div class="row">
                <div class="col-md-4 text-right">
                  <label for="price"><?php getLanguage(912)?></label>
                </div>
                <div class="col-md-8 text-left">
                  <input type="text" name="price" id="price" value="<?php echo PAYMENT_PRICE; ?>" size="30"><br>
                  <span class="supporting"><?php getLanguage(912)?></span>
                </div>
              </div> 
              <div class="row">
                <div class="col-md-4 text-right">
                </div>
                <div class="col-md-8 text-left">
                  <input type="submit" value="<?php getLanguage(137)?>" class="btn btn-primary"> 
                  <input type="reset" value="<?php getLanguage(229)?>" class="btn btn-primary">
                </div>
              </div>
              <br>          
            </form>
          </center>
    </div>
    <div class="admindiv">
      <div class="admindivheader"><?php getLanguage(893)?></div>
	       <span class="adminsearch">
          <form action="administration/payments.php" method="get">
            <br>
            <input type="text" id="squery" name="squery" size="40" placeholder="<?php getLanguage(11)?>" />
            <input type="submit" id="searchSubmit" value="<?php getLanguage(11)?>" />
          </form>
         </span>
    </div>
    <div class="admindiv">
      <div class="admindivheader"><?php getLanguage(894)?></div>
      <?php readparameter(serializeHmPayments); ?>
    </div>
  </center>
  </div>
  <div id="footerspace"></div>