<form action="" method="post">

	<div class="ulp-stuffbox">

		<h3 class="ulp-h3"><?php _e('2Checkout Payment Integration', 'ulp');?></h3>

		<div class="inside">
			<div class="ulp-inside-item">
          <div class="row">
              <div class="col-xs-6">
                  <h4 style="  margin-top:20px;"><?php _e('SandBox Mode', 'ulp');?></h4>
                  <label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">
                    <?php $checked = ($data['metas']['ulp_2checkout_sandbox_on']) ? 'checked' : '';?>
                    <input type="checkbox" class="ulp-switch" onClick="UltimateLearningPro.checkAndH(this, '#ulp_2checkout_sandbox_on');" <?php echo $checked;?> />
                    <div class="switch" style="display:inline-block;"></div>
                  </label>
                  <input type="hidden" name="ulp_2checkout_sandbox_on" value="<?php echo $data['metas']['ulp_2checkout_sandbox_on'];?>" id="ulp_2checkout_sandbox_on" />

    				      <h2><?php _e('Main 2Checkout settings', 'ulp');?></h2>

                  <div class="input-group" style="margin-top:20px;max-width: 400px;">
                			<span class="input-group-addon" id="basic-addon1"><?php _e('API Username::', 'ulp');?></span>
                			<input type="text" class="form-control" name="ulp_2checkout_api_username" value="<?php echo $data ['metas']['ulp_2checkout_api_username'];?>" id="ulp_2checkout_api_username">
                	</div>

                  <div class="input-group" style="margin-top:20px;max-width: 400px;">
                			<span class="input-group-addon" id="basic-addon1"><?php _e('API Password:', 'ulp');?></span>
                			<input type="text" class="form-control" name="ulp_2checkout_api_password" value="<?php echo $data ['metas']['ulp_2checkout_api_password'];?>" id="ulp_2checkout_api_password">
                	</div>

                  <div class="input-group" style="margin-top:20px;max-width: 400px;">
                			<span class="input-group-addon" id="basic-addon1"><?php _e('API Private Key:', 'ulp');?></span>
                			<input type="text" class="form-control" name="ulp_2checkout_api_private_key" value="<?php echo $data ['metas']['ulp_2checkout_api_private_key'];?>" id="ulp_2checkout_api_private_key">
                	</div>

                  <div class="input-group" style="margin-top:20px;max-width: 400px;">
                			<span class="input-group-addon" id="basic-addon1"><?php _e('Account number:', 'ulp');?></span>
                			<input type="text" class="form-control" name="ulp_2checkout_account_number" value="<?php echo $data ['metas']['ulp_2checkout_account_number'];?>" id="ulp_2checkout_account_number">
                	</div>

                  <div class="input-group" style="margin-top:20px; max-width: 400px;">
                			<span class="input-group-addon" id="basic-addon1"><?php _e('Secret word:', 'ulp');?></span>
                			<input type="text" class="form-control" name="ulp_2checkout_secret_word" value="<?php echo $data ['metas']['ulp_2checkout_secret_word'];?>" id="ulp_2checkout_secret_word">
                	</div>

									<div>
										<div class="ulp-form-line"><strong><?php echo __("Important: set your 'Webhook' to: ", 'ulp') . $data ['webhook'];?></strong></div>
                    <div style="font-size: 11px; color: #333; padding-left: 10px; padding-left: 15px; margin-left: 10px;border-left: 2px solid #C56767;">
                      <div><?php _e('1. Go to', 'ulp');?> <a href="https://www.2checkout.com/" target="_blank">https://www.2checkout.com/</a> <?php echo __(' (or ', 'ihc');?> <a href="https://sandbox.2checkout.com/sandbox" target="_blank">https://sandbox.2checkout.com/sandbox</a> <?php echo __('if you want to use sandbox) and login with username and password.', 'ulp');?></div>
      								<div><?php _e('2. After you login go to "Account" section and then click on "Site Management". Here you will find, at the bottom of page, the "Secret Word".', 'ulp');?>
      								<div><?php echo __('3. In this section you also need to set the "Approved URL" to: ', 'ulp') . $data ['webhook'];?></div>
      								<div><?php echo __('4. The "Account Number" is next to your username in the top right of the site.', 'ulp');?></div>
      								<div><?php echo __('5. In "API" you will find the "Private Key".', 'ulp');?></div>
      								<div><?php echo __('6. "API Username" and "API Password" can be found or set in "Account" -> "User Management".', 'ulp');?></div>
      								<div><?php echo __("7. After you copy and paste all these keys you must set your INS (Instant Notification Settings) to:  ", 'ulp') . '<strong>' . $data ['webhook'] . '</strong>' . " ." .  __('You can find this option in "Webhooks" on the live site or "Notifications" in sandbox.', 'ulp');?></div>
                    </div>
									</div>
              </div>
          </div>
      </div>



      <div class="ulp-line-break"></div>

      <div class="ulp-inside-item" style="margin-top:10px;">
          <div class="row">
            <div class="col-xs-6">
                <h2><?php _e('Display options', 'ulp');?></h2>
          			<div class="input-group" style="  max-width: 400px;">
          					<span class="input-group-addon" id="basic-addon1"><?php _e('Label', 'ulp');?></span>
          					<input type="text" class="form-control" name="ulp_2checkout_label" value="<?php echo stripslashes($data['metas']['ulp_2checkout_label']);?>" id="ulp_2checkout_label" />
          			</div>

    						<div class="input-group" style="margin-top:40px;  max-width: 400px;">
          					<span class="input-group-addon" id="basic-addon1"><?php _e('Description', 'ulp');?></span>
          					<input type="text" class="form-control" name="ulp_2checkout_description" value="<?php echo stripslashes($data['metas']['ulp_2checkout_description']);?>" id="ulp_2checkout_description" />
                </div>

                <div class="input-group" style="margin-top:20px; max-width: 400px;">
          					<span class="input-group-addon" id="basic-addon1"><?php _e('Multi-Payment order', 'ulp');?></span>
          					<input type="number" min="1" class="form-control" name="ulp_2checkout_multipayment_order" value="<?php echo $data['metas']['ulp_2checkout_multipayment_order'];?>" id="ulp_2checkout_multipayment_order" />
                </div>
            </div>
          </div>
      </div>

			<div class="ulp-submit-form" style="margin-top: 20px;">
				<input type="submit" value="<?php _e('Save Changes', 'ulp');?>" name="submit" class="btn btn-primary pointer" />
			</div>
		</div>
	</div>

</form>
