<?php 
$this->load->view('site/templates/commonheader'); 
$this->load->view('site/templates/shop_header');//$checkloginIDarr=$this->session->all_userdata(); echo "<pre>"; print_r($checkloginIDarr);
?>
<script type="text/ecmascript" src="js/site/custom_validation.js" ></script>
<?php //print_r($selectSeller_details);
$payment_mode=explode(",",$selectSeller_details[0]['payment_mode']);
?>
<div style="background:#fff; border-bottom:1px solid #ccc; border-top:1px solid #ccc;" class="add_shop">
<div class="main">
<div class="shop_details">
    			<span class="shop_title"><?php if($this->lang->line('shop_methods') != '') { echo stripslashes($this->lang->line('shop_methods')); } else echo 'Payment methods you accept'; ?>.</span>                
				<div class="list_div1">
                	<div class="list_inner_fields" style="border:none">
                    	<div style="float:left; width:60%; margin:5px 0 20px; color:#999999; font-size:14px; line-height:22px">
                        	<?php if($this->lang->line('shop_direct') != '') { echo stripslashes($this->lang->line('shop_direct')); } else echo 'Direct payment through'; ?> <?php echo $this->config->item('email_title'); ?> <?php if($this->lang->line('shop_available') != '') { echo stripslashes($this->lang->line('shop_available')); } else echo 'is not yet available in your country. Please select one of the payment methods below'; ?>. 
                        </div>
                        <img src="images/paypal.png" style="float:right; opacity:0.3" />
                    </div>            
                </div>
    			<div class="payment_div">
                	<h2><?php if($this->lang->line('shop_other') != '') { echo stripslashes($this->lang->line('shop_other')); } else echo 'Other payment options'; ?> </h2>
                    <!--<p><?php if($this->lang->line('shop_eligible') != '') { echo stripslashes($this->lang->line('shop_eligible')); } else echo 'These are not eligible for our'; ?> <a href="javascript: void(0);"><?php echo $this->config->item('email_title'); ?> <?php if($this->lang->line('shop_protection') != '') { echo stripslashes($this->lang->line('shop_protection')); } else echo 'Seller Protection Program'; ?>.</a> </p>-->
                    <p><?php if($this->lang->line('shop_recommend') != '') { echo stripslashes($this->lang->line('shop_recommend')); } else echo 'We recommend also signing up above to ensure'; ?> <?php echo $this->config->item('email_title'); ?> <?php if($this->lang->line('shop_redeemed') != '') { echo stripslashes($this->lang->line('shop_redeemed')); } else echo 'gift cards and credits can be redeemed in your shop'; ?>. </p>
                </div>
    <form method="post" action="site/shop/shop_getpaid_details">
		<div class="list_div" style="border-radius:5px 5px 0 0; margin:5px 0 0">
        	<span id="overall_err" class="errors_msg"></span>
            <div class="payment_check">                        
                <input type="checkbox" id="paypal" onchange="return shop_payment_disp1('paypal','paypal_wrap');" name="payment_mode[]"  value="PayPal" />
                <label for="paypal"><?php if($this->lang->line('shop_pay') != '') { echo stripslashes($this->lang->line('shop_pay')); } else echo 'PayPal'; ?></label>
                <div class="payment_hide" style="display:none;" id="paypal_wrap">
                <p><?php if($this->lang->line('shop_payments') != '') { echo stripslashes($this->lang->line('shop_payments')); } else echo 'Payments are sent to this email'; ?>. </p>
                <table>
                	<tr>
                    	<td><label><?php if($this->lang->line('shop_mode') != '') { echo stripslashes($this->lang->line('shop_mode')); } else echo 'Mode'; ?></label></td>
                        <td>	
                        	<input type="radio" id="pplive" name="PayPal_mode" value="Live" <?php if($selectSeller_details[0]['PayPal_mode']=='Live'){ echo 'checked="checked"'; } ?> />
                            <label for="pplive" style="width:auto; margin:2px 0 0 0"><?php if($this->lang->line('shop_live') != '') { echo stripslashes($this->lang->line('shop_live')); } else echo 'Live'; ?></label>
                            <input type="radio" id="ppsandbox" name="PayPal_mode" value="Sandbox" <?php if($selectSeller_details[0]['PayPal_mode']=='Sandbox'){ echo 'checked="checked"'; } ?>/>
                            <label for="ppsandbox" style="width:auto; margin:2px 0 0 0"><?php if($this->lang->line('shop_sandbox') != '') { echo stripslashes($this->lang->line('shop_sandbox')); } else echo 'Sandbox'; ?></label>
                        </td>
                        <td><span id="PayPal_modeErr" class="errors_msg"></span></td>
                    </tr>
                    <tr>
                    	<td><label><?php if($this->lang->line('shop_paypalaccount') != '') { echo stripslashes($this->lang->line('shop_paypalaccount')); } else echo 'PayPal account email'; ?> </label></td>
                        <td><input type="text" class="payment_txt" id="emailaddress" name="PayPal_email" value="<?php echo $selectSeller_details[0]['PayPal_email']; ?>" /></td>
                        <td><span id="emailaddressErr" class="errors_msg"></span></td>
                    </tr>  
                    <!--<tr>
                    	<td><label><?php if($this->lang->line('shop_apiusername') != '') { echo stripslashes($this->lang->line('shop_apiusername')); } else echo 'API Username'; ?> </label></td>
                        <td><input type="text" class="payment_txt" id="APIUsername" name="paypal_username" value="<?php echo $selectSeller_details[0]['paypal_username']; ?>" /></td>
                        <td><span id="APIUsernameErr" class="errors_msg"></span></td>
                    </tr>
                    <tr>
                    	<td><label><?php if($this->lang->line('shop_apipassword') != '') { echo stripslashes($this->lang->line('shop_apipassword')); } else echo 'API Password'; ?> </label></td>
                        <td><input type="text" class="payment_txt" id="APIPassword" name="paypal_password" value="<?php echo $selectSeller_details[0]['paypal_password']; ?>" /></td>
                        <td><span id="APIPasswordErr" class="errors_msg"></span></td>
                    </tr>  
                    <tr>
                    	<td><label><?php if($this->lang->line('shop_apisignature') != '') { echo stripslashes($this->lang->line('shop_apisignature')); } else echo 'API Signature'; ?> </label></td>
                        <td><input type="text" class="payment_txt" id="APISignature" name="paypal_signature" value="<?php echo $selectSeller_details[0]['paypal_signature']; ?>" /></td>
                        <td><span id="APISignatureErr" class="errors_msg"></span></td>
                    </tr>  -->                    
                </table>
                
               
                </div>
                <?php if (in_array("PayPal", $payment_mode)) {echo '<script>$("#paypal").prop("checked", true);$("#paypal_wrap").css("display","block")</script>';	} ?>
            </div>
        <!--<div class="payment_check">
            <input type="checkbox" id="money_order" onchange="return shop_payment_disp()" name="payment_mode[]" value="Money Order"/>
            <label for="money_order" >Money Order </label>
            <input type="checkbox" style="margin:3px 0 0 20px" id="personal_check" onchange="return shop_payment_disp()" name="payment_mode[]" value="Personal Check" />
            <label for="personal_check">Personal Check</label>
            <div class="payment_hide"  style="display:none;" id="money__wrap">
                <p>Buyers are instructed to mail their payment to this address.  </p>
                <table>
                    <tr>
                        <td>
                            <div class="payment_div_left">
                                <label>Country</label><span id="countryErr" class="errors_msg"></span>
                                <select style="width:87%; margin:5px 0 0; padding:5px;" id="country" name="Pay_country">
                                    <option value="">Select Country</option>
                                    <?php 
                                        foreach($countryList as $country) 
                                        {
                                            echo'<option value="'.$country->name.'">'.$country->name.'</option>'; 
                                        }	
                                    ?>
                                </select>  
                                                                          
                            </div>
                        </td>
                        <td>
                            <div class="payment_div_left">
                                <label>Full Name </label><span id="fullnameErr" class="errors_msg"></span>
                                <input type="text" class="payment_txt" id="fullname" name="Pay_fullname" value="<?php echo $selectSeller_details[0]['Pay_fullname']; ?>"/>        
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="payment_div_left">
                                <label>Street</label><span id="streetErr" class="errors_msg"></span>
                                <input type="text" class="payment_txt" id="street" name="Pay_street" value="<?php echo $selectSeller_details[0]['Pay_street']; ?>"/>                                
                            </div>
                        </td>
                        <td>
                            <div class="payment_div_left">
                                <label>Apt/Suite/Other </label>
                                <input type="text" class="payment_txt" id="Pay_aso" name="Pay_aso" value="<?php echo $selectSeller_details[0]['Pay_aso']; ?>" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="payment_div_left">
                                <label>City</label><span id="cityErr" class="errors_msg"></span>
                                <input type="text" class="payment_txt" id="city" name="Pay_city" value="<?php echo $selectSeller_details[0]['Pay_city']; ?>" />                                
                            </div>
                        </td>
                        <td>
                            <div class="payment_div_left">
                                <label>State / Province / Region</label>
                                <input type="text" class="payment_txt" id="Pay_state" name="Pay_state" value="<?php echo $selectSeller_details[0]['Pay_state']; ?>"/>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="payment_div_left">
                                <label>Zip / Postal Code </label><span id="zippostalcodeErr" class="errors_msg"></span>
                          <input type="text" class="payment_txt"  id="zippostalcode" name="Pay_zippostalcode" value="<?php echo $selectSeller_details[0]['Pay_zippostalcode']; ?>"/>
                            </div>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>                             
              </div>
		<?php 
			if (in_array("Money Order", $payment_mode) || in_array("Personal Check", $payment_mode)) 
			{
				echo '<script>$("#money__wrap").css("display","block");$("#country").val("'.$selectSeller_details[0]['Pay_country'].'");</script>';	
				if (in_array("Money Order", $payment_mode)){echo '<script>$("#money_order").prop("checked", true);</script>';}
				if (in_array("Personal Check", $payment_mode)){echo '<script>$("#personal_check").prop("checked", true);</script>';}
			}
		?>
        </div>-->
            <!--<div class="payment_check">
                <input type="checkbox" id="other"  name="payment_mode[]" value="Other"/><label for="other">Other</label>
                <?php if (in_array("Other", $payment_mode)) {echo '<script>$("#other").prop("checked", true);</script>';} ?>
            </div>--> 
            <div class="Authorize">
                <input type="checkbox" id="Authorize"  name="payment_mode[]" value="Authorize" onchange="return shop_payment_disp2('Authorize','Authorize_wrap')"/><label for="Authorize"><?php if($this->lang->line('shop_author') != '') { echo stripslashes($this->lang->line('shop_author')); } else echo 'Authorize'; ?></label>
                <div class="payment_hide" style="display:none;" id="Authorize_wrap">
                <p><?php if($this->lang->line('shop_creditcard_authorize') != '') { echo stripslashes($this->lang->line('shop_creditcard_authorize')); } else echo 'Credit Card (Authorize.net)'; ?> </p>
                <table>
                	<tr>
                    	<td><label><?php if($this->lang->line('shop_mode') != '') { echo stripslashes($this->lang->line('shop_mode')); } else echo 'Mode'; ?></label></td>
                        <td>	
                        	<?php if($selectSeller_details[0]['authorize_mode']=='Live'){} ?>
                        	<input type="radio" id="live" name="authorize_mode" value="Live" <?php if($selectSeller_details[0]['authorize_mode']=='Live'){ echo 'checked="checked"'; } ?> />
                            <label for="live" style="float:none !important;"><?php if($this->lang->line('shop_live') != '') { echo stripslashes($this->lang->line('shop_live')); } else echo 'Live'; ?></label>
                            <input type="radio" id="sandbox" name="authorize_mode" value="Sandbox" <?php if($selectSeller_details[0]['authorize_mode']=='Sandbox'){ echo 'checked="checked"'; } ?>/>
                            <label for="sandbox" style="float:none !important;"><?php if($this->lang->line('shop_sandbox') != '') { echo stripslashes($this->lang->line('shop_sandbox')); } else echo 'Sandbox'; ?></label>
                        </td>
                        <td><span id="authorize_modeErr" class="errors_msg"></span></td>
                    </tr>
                    <tr>
                    	<td><label><?php if($this->lang->line('shop_loginid') != '') { echo stripslashes($this->lang->line('shop_loginid')); } else echo 'Login ID'; ?></label></td>
                        <td><input type="text" class="payment_txt"  id="authorize_id" name="authorize_id" value="<?php echo $selectSeller_details[0]['authorize_id']; ?>"/></td>
                        <td><span id="authorize_idErr" class="errors_msg"></span></td>
                    </tr>
                    <tr>
                    	<td><label><?php if($this->lang->line('shop_transactionkey') != '') { echo stripslashes($this->lang->line('shop_transactionkey')); } else echo 'Transaction Key'; ?></label></td>
                        <td><input type="text" class="payment_txt"  id="authorize_key" name="authorize_key" value="<?php echo $selectSeller_details[0]['authorize_key']; ?>"/></td>
                        <td><span id="authorize_keyErr" class="errors_msg"></span></td>
                    </tr>                    
                </table>
                </div>
                <?php if (in_array("Authorize", $payment_mode)) {echo '<script>$("#Authorize").prop("checked", true);$("#Authorize_wrap").css("display","block");</script>';} ?>
            </div>                   
        </div>            
        <div class="payment_btn">
        	<input type="submit" class="btn_save_bill" value="<?php if($this->lang->line('user_save') != '') { echo stripslashes($this->lang->line('user_save')); } else echo 'Save'; ?>" onclick="return shop_payment_validation();"/>
        </div>
	</form>
</div>
</div>
</div>
<?php 
$this->load->view('site/templates/footer');
?>
