<div class="payments">
<h3 class="text-uppercase paymentLabel">{$language.lblPaymentMethod}</h3>    
<div class="payment-first cf"> 
<div class="content cf">
  {form->errors name="formPaymentGateway"}
  {form->start name="formPaymentGateway" method="post" action="" onsubmit="return handleSubmit();"}
  {form->hidden name="checkPG" value=0}
 <div class="paymentSec">
     <div class="paymentSelFld">
  {form->select name="paymentSettingsGroupKey" value="" options=$resPaymentGateways caption="->{$language.lblselecttext}"
      class="form-control" validate="checkPG->isequal->0~*required" error=$language.errPaymentMethod}
      </div>
  <div class="payleft "> 
      
      <div class="AjaxOfflinePaymentDesc margin-top"></div>
      <div class="paymentDesc margin-top">
        {if $enableTermsPrivacy eq 'Yes'}
            <div class=""> {$language.lblAgree} {$language.lblAgreeCinfirm} {$language.lblAgreeBtn}{$language.lblIAgree} 
             {if ""|dynamic_menu:'url':'terms-and-conditions'}
              {html->anchor target="blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'terms-and-conditions' caption=$language.lblTermsAndConditions|dynamic_menu:'caption':'terms-and-conditions'}{/if}
              {if ""|dynamic_menu:'url':'privacy-statements'} {$language.lblAnd} {html->anchor target="blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'privacy-statements' caption=$language.lblPrivacyPolicy|dynamic_menu:'caption':'privacy-statements'}{/if}


            </div>
            {/if}
      </div>
   {*{if $paymentGatewaysCount|default:0 eq 0}
                                        {form->hidden name="paymentSettingsGroupKey11" value=$resPaymentGateways[0].paySetGroupKey}
                                        	<strong>{$resPaymentGateways[0].label}</strong> 	
                                      {else}
                                      {if $paymentGatewaysCount|default:0 >0}
                                       <ul>
                                           {assign var=key value="0"}
                                           {foreach $resPaymentGateways as $items} 
                                           
                                              <li id="Payment_{$items.paySetGroupKey}" rel="{$items.paySetGroupKey}" class="rbc_normal payment-options font16 reltv paymentNew" data="{$items.label}" style="cursor:pointer;"><span class="item">{$items.label}</span>
                                          </li>
                                          <li class="paymentDesc_{$items.paySetGroupKey} paysubnew font14" style="display:none;">
                                         
                                         <div>
                                              <div class="AjaxOfflinePaymentDesc_{$items.paySetGroupKey}">
                                             </div>
                                            <div id="AjaxAgreeTermsDiv_{$items.paySetGroupKey}" class=""> {form->hidden  name="enableTermsPrivacy_{$items.paySetGroupKey}" value=$enableTermsPrivacy}
                                            {if $enableTermsPrivacy eq 'Yes'}
                                               
                                                <div class=""> {$language.lblAgree} <a>{$language.lblAgreeCinfirm}</a> {$language.lblAgreeBtn}{$language.lblIAgree} 
                                                 {if ""|dynamic_menu:'url':'terms-and-conditions'}
                                                  {html->anchor target="blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'terms-and-conditions' caption=$language.lblTermsAndConditions|dynamic_menu:'caption':'terms-and-conditions'}{/if}
                                                  {if ""|dynamic_menu:'url':'privacy-statements'} {$language.lblAnd} {html->anchor target="blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'privacy-statements' caption=$language.lblPrivacyPolicy|dynamic_menu:'caption':'privacy-statements'}{/if}
                                                 
                                                 
                                                </div>
                                                {/if}
                                          </div>
                                          </div>
                                      {/foreach}
                                       </ul>
                                      {/if}
                                    {/if}*}
                                   
                            
  {form->hidden name="imgFullPath" value=$view_images}
  {form->hidden name="siteHosted" value=0}
  {form->hidden name="userCardType"}
  {form->hidden name="paymentGatewaysCount" value=$paymentGatewaysCount|default:0}
 </div>
  <div class="payright margin-top">
    <div id="AjaxdivPaymentCardTypes" class="payment-div">
    	<ul id="AjaxdivPaymentCardTypeImages" class="clearfix"></ul>
    </div>
    <div id="AjaxdivPaymentElements" class="payment-div" style="display:block;"> 
        <span id="AjaxloadProcessImagePay"></span>
        <ul class="form_list">
          <li class="row form-group">
        <div class="col-xs-6" id="AjaxdivPayCardholderFirstName">
          <label>{$language.lblCardholderFirstName} <span class="mndty">*</span></label>
          {form->textbox name="creditCardFirstName"  autocomplete="Off" class="form-control" validate="siteHosted->isequal->1~*required" error=$language.errCardholderFirstName maxlength="50"} </div>
        <div class="col-xs-6 pull-right" id="AjaxdivPayCardholderLastName">
          <label> {$language.lblCardholderLastName} <span class="mndty">*</span></label>
          {form->textbox name="creditCardLastName" validate_event="submit" autocomplete="Off" class="form-control"  validate="siteHosted->isequal->1~*required" error=$language.errCardholderLastName maxlength="50"} </div>
      </li>
          <li class="row form-group">
          	
            
            	<div class="field_wrp col-sm-6" id="AjaxdivPayCardType">
                    <label>{$language.lblCardType} <span class="mndty">*</span></label>
              {form->select name="creditCardType" class="form-control"
              validate="siteHosted->isequal->1~*required" validate_event="change" error=$language.errCardType} 
              </div>
            	<div class="field_wrp col-sm-6 pull-right" id="AjaxdivPayCardNumber">
                    <label>{$language.lblCardNumber} <span class="mndty">*</span> </label>
              {form->textbox name="creditCardNumber" autocomplete="Off" placeholder="{$language.lblCardNumber}" class="form-control"  
              validate="siteHosted->isequal->1~*required" error=$language.errInvalidcc maxlength="20"}
              </div>
          
          </li>
         <li id="AjaxdivPayExpiryDate"  class="row form-group">
        <div class="col-sm-6">
          
            <label> {$language.lblExpiryDate} <span class="mndty">*</span></label>
    <div class="row">
          <div class="col-sm-6"> 
              {form->select name="expMonth" options="01->Jan~*02->Feb~*03->Mar~*04->Apr~*05->May~*06->Jun~*07->Jul~*08->Aug~*09->Sep~*10->Oct~*11->Nov~*12->Dec" class="form-control"}
              </div>
            <div class="col-sm-6">
            {form->select name="expYear" options=$years|default:array() class="form-control"} </div>
        </div>
        </div>
        <div class="col-sm-6 pull-right">
            <div class="row">
                <label class="col-sm-9">{$language.lblSecurityCode} <span class="mndty">*</span></label>
          <div class="col-sm-6">
            

          <div class="field"> {form->textbox name="securityCode" autocomplete="Off" class="form-control"  validate="siteHosted->isequal->1~*required~*isNumber" error=$language.errInvalidcvv maxlength="5"} </div>
         </div>
          <span class="help col-sm-6">  <a onclick="window.open('https://www.paypal.com/uk/cgi-bin/webscr?cmd=xpt/Help/popup/CVVInfoPopC-outside','ghg','toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=780,height=550')" style="cursor:pointer;" id="divSecurityText">{$language.lblWhatIs}?</a>
              <span class=" slip"><span class="icon-question"></span> <span class="pw-text curve-r5">{$language.lblForMasterCard} 
                  {$language.lbldigitsinthesignature}  
                  {$language.lblOfyourcard}  
                  {$language.lblThefourdigits} <a onclick="window.open('https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=xpt/Help/popup/CVVInfoPopC-outside','ghg','toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=780,height=550')" style="cursor:pointer;"  >{$language.lblmoretext}...</a></span></span></span>
            </div>
        </div>
      </li>
        </ul>
      </div>
      <div id="AjaxdivPaymentElements1" class="payment-div1" style="display:block;">
       <ul class="form_list">
        <li class="row">
            <label>{$language.lblCardType} <span class="mndty">*</span></label>
            
            	<div class="field_wrp " id="AjaxdivPayCardType">
              {form->select name="creditCardType1" class="form-control"
              validate="siteHosted->isequal->2~*required" validate_event="change" error=$language.errCardType} </div>
     
            </li>
       </ul>
      {form->hidden name="creditCardType" value="VISA"}
      </div><!--PAYFORT INTEGRATION 06-04-15--> 
	  
	<!--PAYTAB SADAD INTEGRATION --> 
	<div id="AjaxdivPaymentElements2" class="payment-div2" style="display:block;">
       <ul class="form_list">
        <li class="clearfix">
            <label>{$language.lblOlpID} <span class="mndty">*</span></label>
         
            	<div class="field_wrp" id="AjaxdivPayCardType">
              {form->textbox name="OlpID" class="form-control"
              validate="siteHosted->isequal->3~*required" validate_event="change" error=$language.lblOlpID} </div>
         
            </li>
       </ul>
      {form->hidden name="creditCardType" value="VISA"}
      </div>
	  
  	</div>
      
      </div>
    <div class="submit-section margin-top">
    <div id="AjaxAgreeTermsDiv" class="spacer03 pad0-15"> {form->hidden  name="enableTermsPrivacy" value=$enableTermsPrivacy}
       {* {if $enableTermsPrivacy eq 'Yes'}
                                               
                                                <div class="mrg10 slip"> {$language.lblAgree} <a>{$language.lblAgreeCinfirm}</a> {$language.lblAgreeBtn}{$language.lblIAgree} {*{form->checkbox class="pos-abs chkbx1"  name="agree_{$items.paySetGroupKey}" caption=$language.lblIAgree value="1" chkag="{$items.paySetGroupKey}"} *}
                                                 {*{if ""|dynamic_menu:'url':'terms-and-conditions'}
                                                  {html->anchor target="blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'terms-and-conditions' caption=$language.lblTermsAndConditions|dynamic_menu:'caption':'terms-and-conditions'}{/if}
                                                  {if ""|dynamic_menu:'url':'privacy-statements'} {$language.lblAnd} {html->anchor target="blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'privacy-statements' caption=$language.lblPrivacyPolicy|dynamic_menu:'caption':'privacy-statements'}{/if}*}
                                                 {*<span class="mndty">*</span> 
                                              *}
                                                  {*<div> {form->validate name="validateAgree_{$items.paySetGroupKey}" validate="paymentSettingsGroupKey->isequal->{$items.paySetGroupKey}~*agree_{$items.paySetGroupKey}->required"  error=$language.errAgreement} </div>*}
                                                {*</div>
                                                {/if}*}
{*    {if $enableTermsPrivacy eq 'Yes'}
                <div class="chk_list">  
                <label for="agree">{form->checkbox class="pos-abs chkbx1"  name="agree"  caption=$language.lblIAgree value="1"} </label>
                 {if ""|dynamic_menu:'url':'terms-and-conditions'}
                  {html->anchor target="_blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'terms-and-conditions' caption=$language.lblTermsAndConditions|dynamic_menu:'caption':'terms-and-conditions'}{/if}
                  {if ""|dynamic_menu:'url':'privacy-statements'} {$language.lblAnd} {html->anchor target="_blank" rel="howitswork" href="#"|dynamic_menu:'hrefurl':'privacy-statements' caption=$language.lblPrivacyPolicy|dynamic_menu:'caption':'privacy-statements'}{/if}
                 <span class="mndty">*</span> 
                  <div class="clear"></div>
                  <div> {form->validate name="validateAgree" validate="agree->required" error=$language.errAgreement} </div>
                </div>
                {/if}*}
     
      <div class="clear"></div>
      {form->hidden  name="hiddenBankDetails" id="hiddenBankDetails"} {*29-05-15*}
    </div>
    <!-- End : Visa Payment -->
   
    <div class="pad0-15" id="divPaymentButtonDiv"> 
    {form->hidden  name="cartShipDetails" id="cartShipDetails" value=""} 
    {form->hidden  name="cartShipMethodDetails" id="cartShipMethodDetails" value=""} 
    {form->submit name="submitPayment" id="submitPayment" value=$language.lblConfirmOrder 
    class="btn btn-primary btn-lg btn-block"}
    {form->submit  name="submitPaymentLoader" style="display:none" tabindex="3"
    disabled="disabled"  id="submitPaymentLoader" class="btn btn-primary btn-lg buttonDisable"
    value="{$language.lblCartPleaseWait}"} 
    </div>
    </div>
     
    {assign var="paymentNote" value=$paymentNote.content|default:''}
{if $paymentNote !=''}
    <div class="paymenNotes">
    	<h5 class="f18 pn-sb c_c_4">{$language.lblNote}</h5>
        {$paymentNote}
        
    </div>
    {/if}
  
  {form->close}
  {form->validate_script form="formCheckoutShipping"} 
  {form->validate_script form="formPaymentGateway"} 
</div>
<script type="text/javascript">
    var totamt = '{$cartData.orderTotalAmount}';
    if(totamt<=0) {    
        $("#checkPG").val(1);        
        $(".paymentSelFld").hide();        
        $(".paymentLabel").hide();
    } else {
        $(".paymentSelFld").show();
        $(".paymentLabel").show();
    }
 $(document).on('click', '#agree', function(){
  if ($("#agree").prop('checked',true)) {
    $("#div_err_formPaymentGateway_validateAgree").addClass('hide');
  }  
});
//22-04-15 START
$(".show-shippings").on('click',function() {    
    if($(".checkout_shipping").is(":hidden"))
    {
            $(".checkout_shipping").slideToggle(500);
            $(".checkout_billing ,.checkout_shipping_method ,.checkout_payment").slideUp();
    }
});
</script>

<style type="text/css">
.box{
        display:block;

        margin-top: 10px;
    }
    
    #selectField{
 
        width: 200px;
    }
</style>
</div>
</div>