Location: PHPKode > projects > HikaShop > front/views/checkout/tmpl/payment.php
<?php
/**
 * @package		HikaShop for Joomla!
 * @version		1.4.3
 * @author		hikashop.com
 * @copyright	(C) 2010 HIKARI SOFTWARE. All rights reserved.
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_payment_methods" class="hikashop_payment_methods">
	<fieldset>
		<legend><?php echo JText::_('HIKASHOP_PAYMENT_METHOD');?></legend>
		<table class="hikashop_payment_methods_table">
			<?php 
			$done = false;
			$row_index=0;
			if(!empty($this->methods)){
				foreach($this->methods as $method){
					$checked = '';
					if(($this->payment_method==$method->payment_type && $this->payment_id==$method->payment_id)|| (empty($this->payment_id)&&!$done)){
						$checked = 'CHECKED';
						$done = true;
					}
					if($this->config->get('auto_submit_methods',1) && empty($method->ask_cc) && empty($method->custom_html)){
						$checked.=' onclick="this.form.submit(); return false;"';
					}
				?>	
				<tr>
					<td>
						<input class="hikashop_checkout_payment_radio" id="radio_<?php echo $method->payment_type.'_'.$method->payment_id;?>" type="radio" name="hikashop_payment" value="<?php echo $method->payment_type.'_'.$method->payment_id;?>" <?php echo $checked; ?> />
					</td>
					<td><label for="radio_<?php echo $method->payment_type.'_'.$method->payment_id;?>" style="cursor:pointer;">
						<span class="hikashop_checkout_payment_image">
						<?php 
							$images = explode(',',$method->payment_images);
							if(!empty($images)){
								foreach($images as $image){
									?>
									<img src="<?php echo HIKASHOP_IMAGES .'payment/'. @$this->images_payment[$image];?>"/>
									<?php 
								}
							}
						?>
						</span>
						</label>
					</td>
					<td><label for="radio_<?php echo $method->payment_type.'_'.$method->payment_id;?>" style="cursor:pointer;">
						<span class="hikashop_checkout_payment_name"><?php echo $method->payment_name;?></span>
						<?php if(!empty($method->payment_description)){ ?>
						<br/>
						<span class="hikashop_checkout_payment_description"><?php echo $method->payment_description;?></span>
						<?php }?></label>
					</td>
				</tr>
				<tr>
					<td colspan="3">
						<div id="hikashop_credit_card_<?php echo $method->payment_type.'_'.$method->payment_id;?>" class="hikashop_credit_card">
						<?php 
						if(!empty($method->ask_cc)){
							$app =& JFactory::getApplication();
							$cc_number = $app->getUserState( HIKASHOP_COMPONENT.'.cc_number');
							$cc_month = $app->getUserState( HIKASHOP_COMPONENT.'.cc_month');
							$cc_year = $app->getUserState( HIKASHOP_COMPONENT.'.cc_year');
							$cc_CCV = $app->getUserState( HIKASHOP_COMPONENT.'.cc_CCV');
							$cc_owner = $app->getUserState( HIKASHOP_COMPONENT.'.cc_owner');
							if(!empty($cc_number) && !empty($cc_month) && !empty($cc_year) && (!empty($cc_CCV)|| empty($method->ask_ccv)) && (!empty($cc_owner)|| empty($method->ask_owner))){
								$cc_number = base64_decode($cc_number);
								$cc_month = base64_decode($cc_month);
								$cc_year = base64_decode($cc_year);
								$cc_owner = base64_decode($cc_owner);
								?>
						<table width="100%">
							<?php if(!empty($method->ask_owner)){ ?>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_CCV_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JText::_('CREDIT_CARD_OWNER'); ?></label></td>
								<td><span class="hikashop_credit_ccv"><?php echo $cc_owner; ?></span></td>
							</tr>
							<?php } ?>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_number_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JText::_('CREDIT_CARD_NUMBER'); ?></label></td>
								<td><span class="hikashop_credit_card_number"><?php echo "XXXXXXXXXXX" . substr($cc_number,strlen($cc_number)-5,4);?></span></td>
							</tr>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_month_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JText::_('EXPIRATION_DATE'); ?></label></td>
								<td><span class="hikashop_credit_card_date"><?php echo $cc_month."/".$cc_year;?></span></td>
							</tr>
							<?php if(!empty($method->ask_ccv)){ ?>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_CCV_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JHTML::tooltip(JText::_('CVC_TOOLTIP_TEXT'), JText::_('CVC_TOOLTIP_TITLE'), 
		                    '', 'CARD_VALIDATION_CODE'); ?></label></td>
								<td><span class="hikashop_credit_ccv">XXX</span></td>
							</tr>
							<?php } ?>
						</table>
						<?php }else{
							static $done = false;
							if(!$done){
								$done = true;
								$doc =& JFactory::getDocument();
								$doc->addScript(HIKASHOP_JS.'creditcard.js');
							} ?>
						<table width="100%">
							<?php if(!empty($method->ask_owner)){ ?>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_owner_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JText::_('CREDIT_CARD_OWNER'); ?></label></td>
								<td><input type="text" style="text-align: center;" id="hikashop_credit_card_owner_<?php echo $method->payment_type.'_'.$method->payment_id;?>" name="hikashop_credit_card_owner[<?php echo $method->payment_type.'_'.$method->payment_id;?>]" value="" /></td>
							</tr>
							<?php } ?>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_number_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JText::_('CREDIT_CARD_NUMBER'); ?></label></td>
								<td><input type="text" name="hikashop_credit_card_number[<?php echo $method->payment_type.'_'.$method->payment_id;?>]" id="hikashop_credit_card_number_<?php echo $method->payment_type.'_'.$method->payment_id;?>" value="" onchange="if(!hikashopCheckCreditCard(this.value)){ this.value='';}"/></td>
							</tr>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_month_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JText::_('EXPIRATION_DATE'); ?></label></td>
								<td><input style="text-align: center;" type="text" id="hikashop_credit_card_month_<?php echo $method->payment_type.'_'.$method->payment_id;?>" name="hikashop_credit_card_month[<?php echo $method->payment_type.'_'.$method->payment_id;?>]" onkeyup="moveOnMax(this,'hikashop_credit_card_year_<?php echo $method->payment_type.'_'.$method->payment_id;?>');" onfocus="this.value='';" maxlength="2" size="2" value="<?php echo JText::_('MM');?>" /> / <input style="text-align: center;" type="text" id="hikashop_credit_card_year_<?php echo $method->payment_type.'_'.$method->payment_id;?>" name="hikashop_credit_card_year[<?php echo $method->payment_type.'_'.$method->payment_id;?>]" onfocus="this.value='';" maxlength="2" size="2" value="<?php echo JText::_('YY');?>" onchange="var month = document.getElementById('hikashop_credit_card_month_<?php echo $method->payment_type.'_'.$method->payment_id;?>'); if(!hikashopValidateExpDate(month.value,this.value)){this.value='';month.value='';}" /></td>
							</tr>
							<?php if(!empty($method->ask_ccv)){ ?>
							<tr>
								<td style="text-align:right"><label for="hikashop_credit_card_CCV_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo JHTML::tooltip(JText::_('CVC_TOOLTIP_TEXT'), JText::_('CVC_TOOLTIP_TITLE'), 
		                    '', 'CARD_VALIDATION_CODE'); ?></label></td>
								<td><input type="text" style="text-align: center;" id="hikashop_credit_card_CCV_<?php echo $method->payment_type.'_'.$method->payment_id;?>" name="hikashop_credit_card_CCV[<?php echo $method->payment_type.'_'.$method->payment_id;?>]" maxlength="4" size="4" value="" /></td>
							</tr>
							<?php } ?>
						</table>
						<?php
							}
						}elseif(!empty($method->custom_html)){
							echo $method->custom_html;
						}
						?>
						</div>
					</td>
				</tr>
				<?php $row_index++;
				}
			} ?>
		</table>
	</fieldset>
</div>
Return current item: HikaShop