<commit_before><?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to <EMAIL> so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category design
 * @package base_default
 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
 */
/* @var $this Litle_CreditCard_Block_Form_CreditCard  */
?>
<?php
$_reportGroup = $this->getReportGroup();
$_paypageId = Mage::getModel('Litle_CreditCard_Model_PaymentLogic')->getConfigData("paypage_id");
$_paypageUrl = Mage::getModel('Litle_CreditCard_Model_PaymentLogic')->getConfigData("paypage_url");
$_isLoggedIn = Mage::helper('customer')->isLoggedIn();
?>

<script type="text/javascript">
Validation.creditCartTypes.set('DC', [new RegExp('^3(?:0[0-5]|[68][0-9])[0-9]{11}$'), new RegExp('^[0-9]{3}$'), true]);
</script>

<?php
$_time =  date('ymdHis');
$_session =  Mage::getModel("core/session")->getEncryptedSessionId();
$_id = $_time . substr($_session,13);

?>
<?php $_code=$this->getMethodCode() ?>
<ul class="form-list" id="payment_form_<?php echo $_code ?>"
	style="display: none;">

<?php if($_isLoggedIn && $this->getVaultEnabled()):?>
	<?php if ($this->hasStoredCards()): ?>
	<li>
	<label for="<?php echo $_code ?>_cc_vaulted" class="required"><?php echo $this->__('Stored Credit Cards') ?></label>
		<div class="input-box">
			<select id="<?php echo $_code ?>_cc_vaulted" name="payment[cc_vaulted]">
				<option value=""><?php echo $this->__('--Please Select a Stored Credit Card--')?></option>
				<option value="0">New Credit Card</option>

            <?php foreach ($this->getStoredCards() as $card): ?>
                <option value="<?php echo $card->getVaultId() ?>"><?php echo 'Stored ' . $card->getTypeName() . ' Ending in: ' . $card->getLast4() ?></option>
	    	<?php endforeach ?>
            </select>
		</div>
	</li>

	<script type="text/javascript">
	Event.observe($("<?php echo $_code ?>_cc_vaulted"), 'change', function() {
		if ($F(this) != '0') {
			$$('.new-card').invoke('hide');
			$('<?php echo $_code ?>_cc_cid').value="";
			$$('.cid-class').invoke('show');
		} else {
			$$('.new-card').invoke('show');
			$('<?php echo $_code ?>_cc_cid').value="";
			$('<?php echo $_code ?>_cc_type').value = "";
			$('<?php echo $_code ?>_expiration').value = "";
			$('<?php echo $_code ?>_expiration_yr').value = "";
			$('<?php echo $_code ?>_cc_should_save').setValue(false);
			$$('.cid-class').invoke('show');
		}
	});
	</script>
	<?php endif; ?>
<?php endif; ?>
    <li class="new-card">
        <label id="creditcard_cc_type_label" for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
        <div class="input-box">
            <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
                <option value=""><?php echo $this->__('--Please Select--')?></option>
            <?php $_ccType = $this->getInfoData('cc_type') ?>
            <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
                <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
            <?php endforeach ?>
            </select>
        </div>
    </li>
    <li class="new-card">
        <label id="creditcard_cc_number_label" for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
        <div class="input-box">
            <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-type <?php if (!Mage::helper('creditcard')->isSandbox()): ?>validate-cc-number<?php endif ?>" value="" />
        </div>
    </li>
    <li id="<?php echo $_code ?>_cc_type_exp_div" class="new-card">
        <label id="creditcard_cc_expDate_label" for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
        <div class="input-box">
            <div class="v-fix">
                <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month validate-cc-exp required-entry">
                <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
                <?php foreach ($this->getCcMonths() as $k=>$v): ?>
                    <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
                <?php endforeach ?>
                </select>
            </div>
            <div class="v-fix">
                <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
                <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year required-entry">
                <?php foreach ($this->getCcYears() as $k=>$v): ?>
                    <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
                <?php endforeach ?>
                </select>
            </div>
        </div>
    </li>
    <?php echo $this->getChildHtml() ?>
    <?php if($this->hasVerification()): ?>
    <li id="<?php echo $_code ?>_cc_type_cvv_div" class="cid-class">
        <label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
        <div class="input-box">
            <div class="v-fix">
                <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry " id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
            </div>
            <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
        </div>
    </li>
    
<?php endif; ?>

<?php if($_isLoggedIn && $this->getVaultEnabled()):?>
   <li id="<?php echo $_code ?>_cc_type_should_save_div" class="new-card">
       <label for="<?php echo $_code ?>_cc_should_save"><?php echo $this->__('Save Card In My Account') ?></label>
       <div class="input-box">
           <div class="v-fix">
               <input type="checkbox" title="<?php echo $this->__('Save Card In My Account') ?>" class="input-checkbox" id="<?php echo $_code ?>_cc_should_save" name="payment[cc_should_save]" />
           </div>
       </div>
   </li>
<?php endif; ?>

	<?php if($this->getPaypageEnabled()):?>
   		<input type="hidden" id="<?php echo $_code ?>_paypage_id" name="payment[paypage_id]" value="<?php echo $_paypageId; ?>"/>
        <input type="hidden" id="<?php echo $_code ?>_merchant_txn_id" name="payment[merchant_txn_id]" value="<?php echo $_id; ?>"/>
		<input type="hidden" id="<?php echo $_code ?>_paypage_url" name="payment[paypage_url]" value="<?php echo $_paypageUrl; ?>"/>
        <input type="hidden" id="<?php echo $_code ?>_order_id" name="payment[order_id]" value="<?php echo $_id; ?>"/>
        <input type="hidden" id="<?php echo $_code ?>_report_group" name="payment[report_group]" value="<?php echo $_reportGroup; ?>"/>
 		<input type="hidden" id="<?php echo $_code ?>_paypage_enabled" name="payment[paypage_enabled]" value="<?php echo $this->getPaypageEnabled(); ?>"/>
       	<input type="hidden" id="<?php echo $_code ?>_paypage_registration_id" name="payment[paypage_registration_id]" value=""/>
        <input type="hidden" id="<?php echo $_code ?>_bin" name="payment[bin]"/>
        <input type="hidden" id="<?php echo $_code ?>_code" name="payment[code]"/>
        <input type="hidden" id="<?php echo $_code ?>_message" name="payment[message]"/>
        <input type="hidden" id="<?php echo $_code ?>_response_time" name="payment[response_time]"/>
        <input type="hidden" id="<?php echo $_code ?>_type" name="payment[type]"/>
        <input type="hidden" id="<?php echo $_code ?>_litle_txn_id" name="payment[litle_txn_id]"/>
		<input type="hidden" id="<?php echo $_code ?>_vault_id" name="payment[paypage_id]" value="<?php echo $purchase['token']; ?>"/>
	<?php endif; ?>
</ul>

<?php if($this->getPaypageEnabled()):?>
<script type="text/javascript">
	Payment.prototype.save = function() {

		var _saveUrl = this.saveUrl;
		var _onComplete = this.onComplete;
		var _onSave = this.onSave;
		var _currentMethod = this.currentMethod;
		var _form = this.form;

		if (checkout.loadWaiting!=false) return;
		var validator = new Validation(this.form);
		if (this.validate() && validator.validate()) {
			checkout.setLoadWaiting('payment');

			// Litle Page Stuff//
			function setLitleResponseFields(response) {
				$('<?php echo $_code ?>_code').value = response.response;
				$('<?php echo $_code ?>_message').value = response.message;
				$('<?php echo $_code ?>_response_time').value = response.responseTime;
				$('<?php echo $_code ?>_litle_txn_id').value = response.litleTxnId;
				$('<?php echo $_code ?>_type').value = response.type;
			}

			function submitAfterLitle() {
				var cc_num = encodeURI($('creditcard_cc_number').name);
				var cc_cid = encodeURI($('creditcard_cc_cid').name);
				var kvPairs = Form.serialize(_form).split("&");
				for ( var i = kvPairs.length-1; i>=0; i--) {
					if(kvPairs[i].indexOf(cc_num) > -1 || kvPairs[i].indexOf(cc_cid) > -1)
						kvPairs.splice(i,1);
				}
				var request = new Ajax.Request(
					_saveUrl,
					{
						method:'post',
						onComplete: _onComplete,
						onSuccess: _onSave,
						onFailure: checkout.ajaxFailure.bind(checkout),
						parameters: kvPairs.join("&")
					}
				);
			}

			function timeoutOnLitle() {
				setLitleResponseFields();
				alert('timeout error');
				return false;
			}

			function onErrorAfterLitle(response) {
				setLitleResponseFields(response);
				alert('There was an error. Re-enter your payment information, or contact us for further assistance.');
				return false;
			}

			var formFields = {
				"accountNum" : $('<?php echo $_code ?>_cc_number'),
				"paypageRegistrationId" : $('<?php echo $_code ?>_paypage_registration_id'),
				"bin" : $('<?php echo $_code ?>_bin'),
				"cvv2" : $('<?php echo $_code ?>_cc_cid')
			};

			var litleRequest = {
				"paypageId" : $('<?php echo $_code ?>_paypage_id').value,
				"reportGroup" : $('<?php echo $_code ?>_report_group').value,
				"orderId" : $('<?php echo $_code ?>_order_id').value,
				"id" : $('<?php echo $_code ?>_merchant_txn_id').value,
				"url" : ($('<?php echo $_code ?>_paypage_url').value)
			};

			var selectmenu=$("<?php echo $_code ?>_cc_vaulted");

			if(selectmenu){
				var chosenoption=selectmenu.options[selectmenu.selectedIndex]
				if (chosenoption.value == 0){
					if( _currentMethod == "creditcard" ){
						sendToLitle(litleRequest, formFields, setLitleResponseFields, onErrorAfterLitle);
					}
				}
			} else{
				if( _currentMethod == "creditcard" ){
					sendToLitle(litleRequest, formFields, setLitleResponseFields, onErrorAfterLitle);
				}
			}
			submitAfterLitle();
		}
	};
</script>
<?php endif; ?>
<commit_msg>ignore expiration date in save payment post on checkout page<commit_after><?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to <EMAIL> so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category design
 * @package base_default
 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
 */
/* @var $this Litle_CreditCard_Block_Form_CreditCard  */
?>
<?php
$_reportGroup = $this->getReportGroup();
$_paypageId = Mage::getModel('Litle_CreditCard_Model_PaymentLogic')->getConfigData("paypage_id");
$_paypageUrl = Mage::getModel('Litle_CreditCard_Model_PaymentLogic')->getConfigData("paypage_url");
$_isLoggedIn = Mage::helper('customer')->isLoggedIn();
?>

<script type="text/javascript">
Validation.creditCartTypes.set('DC', [new RegExp('^3(?:0[0-5]|[68][0-9])[0-9]{11}$'), new RegExp('^[0-9]{3}$'), true]);
</script>

<?php
$_time =  date('ymdHis');
$_session =  Mage::getModel("core/session")->getEncryptedSessionId();
$_id = $_time . substr($_session,13);

?>
<?php $_code=$this->getMethodCode() ?>
<ul class="form-list" id="payment_form_<?php echo $_code ?>"
	style="display: none;">

<?php if($_isLoggedIn && $this->getVaultEnabled()):?>
	<?php if ($this->hasStoredCards()): ?>
	<li>
	<label for="<?php echo $_code ?>_cc_vaulted" class="required"><?php echo $this->__('Stored Credit Cards') ?></label>
		<div class="input-box">
			<select id="<?php echo $_code ?>_cc_vaulted" name="payment[cc_vaulted]">
				<option value=""><?php echo $this->__('--Please Select a Stored Credit Card--')?></option>
				<option value="0">New Credit Card</option>

            <?php foreach ($this->getStoredCards() as $card): ?>
                <option value="<?php echo $card->getVaultId() ?>"><?php echo 'Stored ' . $card->getTypeName() . ' Ending in: ' . $card->getLast4() ?></option>
	    	<?php endforeach ?>
            </select>
		</div>
	</li>

	<script type="text/javascript">
	Event.observe($("<?php echo $_code ?>_cc_vaulted"), 'change', function() {
		if ($F(this) != '0') {
			$$('.new-card').invoke('hide');
			$('<?php echo $_code ?>_cc_cid').value="";
			$$('.cid-class').invoke('show');
		} else {
			$$('.new-card').invoke('show');
			$('<?php echo $_code ?>_cc_cid').value="";
			$('<?php echo $_code ?>_cc_type').value = "";
			$('<?php echo $_code ?>_expiration').value = "";
			$('<?php echo $_code ?>_expiration_yr').value = "";
			$('<?php echo $_code ?>_cc_should_save').setValue(false);
			$$('.cid-class').invoke('show');
		}
	});
	</script>
	<?php endif; ?>
<?php endif; ?>
    <li class="new-card">
        <label id="creditcard_cc_type_label" for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
        <div class="input-box">
            <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
                <option value=""><?php echo $this->__('--Please Select--')?></option>
            <?php $_ccType = $this->getInfoData('cc_type') ?>
            <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
                <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
            <?php endforeach ?>
            </select>
        </div>
    </li>
    <li class="new-card">
        <label id="creditcard_cc_number_label" for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
        <div class="input-box">
            <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-type <?php if (!Mage::helper('creditcard')->isSandbox()): ?>validate-cc-number<?php endif ?>" value="" />
        </div>
    </li>
    <li id="<?php echo $_code ?>_cc_type_exp_div" class="new-card">
        <label id="creditcard_cc_expDate_label" for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
        <div class="input-box">
            <div class="v-fix">
                <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month validate-cc-exp required-entry">
                <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
                <?php foreach ($this->getCcMonths() as $k=>$v): ?>
                    <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
                <?php endforeach ?>
                </select>
            </div>
            <div class="v-fix">
                <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
                <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year required-entry">
                <?php foreach ($this->getCcYears() as $k=>$v): ?>
                    <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
                <?php endforeach ?>
                </select>
            </div>
        </div>
    </li>
    <?php echo $this->getChildHtml() ?>
    <?php if($this->hasVerification()): ?>
    <li id="<?php echo $_code ?>_cc_type_cvv_div" class="cid-class">
        <label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
        <div class="input-box">
            <div class="v-fix">
                <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry " id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
            </div>
            <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
        </div>
    </li>
    
<?php endif; ?>

<?php if($_isLoggedIn && $this->getVaultEnabled()):?>
   <li id="<?php echo $_code ?>_cc_type_should_save_div" class="new-card">
       <label for="<?php echo $_code ?>_cc_should_save"><?php echo $this->__('Save Card In My Account') ?></label>
       <div class="input-box">
           <div class="v-fix">
               <input type="checkbox" title="<?php echo $this->__('Save Card In My Account') ?>" class="input-checkbox" id="<?php echo $_code ?>_cc_should_save" name="payment[cc_should_save]" />
           </div>
       </div>
   </li>
<?php endif; ?>

	<?php if($this->getPaypageEnabled()):?>
   		<input type="hidden" id="<?php echo $_code ?>_paypage_id" name="payment[paypage_id]" value="<?php echo $_paypageId; ?>"/>
        <input type="hidden" id="<?php echo $_code ?>_merchant_txn_id" name="payment[merchant_txn_id]" value="<?php echo $_id; ?>"/>
		<input type="hidden" id="<?php echo $_code ?>_paypage_url" name="payment[paypage_url]" value="<?php echo $_paypageUrl; ?>"/>
        <input type="hidden" id="<?php echo $_code ?>_order_id" name="payment[order_id]" value="<?php echo $_id; ?>"/>
        <input type="hidden" id="<?php echo $_code ?>_report_group" name="payment[report_group]" value="<?php echo $_reportGroup; ?>"/>
 		<input type="hidden" id="<?php echo $_code ?>_paypage_enabled" name="payment[paypage_enabled]" value="<?php echo $this->getPaypageEnabled(); ?>"/>
       	<input type="hidden" id="<?php echo $_code ?>_paypage_registration_id" name="payment[paypage_registration_id]" value=""/>
        <input type="hidden" id="<?php echo $_code ?>_bin" name="payment[bin]"/>
        <input type="hidden" id="<?php echo $_code ?>_code" name="payment[code]"/>
        <input type="hidden" id="<?php echo $_code ?>_message" name="payment[message]"/>
        <input type="hidden" id="<?php echo $_code ?>_response_time" name="payment[response_time]"/>
        <input type="hidden" id="<?php echo $_code ?>_type" name="payment[type]"/>
        <input type="hidden" id="<?php echo $_code ?>_litle_txn_id" name="payment[litle_txn_id]"/>
		<input type="hidden" id="<?php echo $_code ?>_vault_id" name="payment[paypage_id]" value="<?php echo $purchase['token']; ?>"/>
	<?php endif; ?>
</ul>

<?php if($this->getPaypageEnabled()):?>
<script type="text/javascript">
	Payment.prototype.save = function() {

		var _saveUrl = this.saveUrl;
		var _onComplete = this.onComplete;
		var _onSave = this.onSave;
		var _currentMethod = this.currentMethod;
		var _form = this.form;

		if (checkout.loadWaiting!=false) return;
		var validator = new Validation(this.form);
		if (this.validate() && validator.validate()) {
			checkout.setLoadWaiting('payment');

			// Litle Page Stuff//
			function setLitleResponseFields(response) {
				$('<?php echo $_code ?>_code').value = response.response;
				$('<?php echo $_code ?>_message').value = response.message;
				$('<?php echo $_code ?>_response_time').value = response.responseTime;
				$('<?php echo $_code ?>_litle_txn_id').value = response.litleTxnId;
				$('<?php echo $_code ?>_type').value = response.type;
			}

			function submitAfterLitle() {
				var cc_num = encodeURI($('creditcard_cc_number').name);
				var cc_cid = encodeURI($('creditcard_cc_cid').name);
				var cc_exp_month = encodeURI($('creditcard_expiration').name);	
				var cc_exp_year = encodeURI($('creditcard_expiration_yr').name);
				var kvPairs = Form.serialize(_form).split("&");
				for ( var i = kvPairs.length-1; i>=0; i--) {
					if(kvPairs[i].indexOf(cc_num) > -1 || kvPairs[i].indexOf(cc_cid) > -1 || kvPairs[i].indexOf(cc_exp_month) > -1 || kvPairs[i].indexOf(cc_exp_year) > -1)
						kvPairs.splice(i,1);
				}
				var request = new Ajax.Request(
					_saveUrl,
					{
						method:'post',
						onComplete: _onComplete,
						onSuccess: _onSave,
						onFailure: checkout.ajaxFailure.bind(checkout),
						parameters: kvPairs.join("&")
					}
				);
			}

			function timeoutOnLitle() {
				setLitleResponseFields();
				alert('timeout error');
				return false;
			}

			function onErrorAfterLitle(response) {
				setLitleResponseFields(response);
				alert('There was an error. Re-enter your payment information, or contact us for further assistance.');
				return false;
			}

			var formFields = {
				"accountNum" : $('<?php echo $_code ?>_cc_number'),
				"paypageRegistrationId" : $('<?php echo $_code ?>_paypage_registration_id'),
				"bin" : $('<?php echo $_code ?>_bin'),
				"cvv2" : $('<?php echo $_code ?>_cc_cid')
			};

			var litleRequest = {
				"paypageId" : $('<?php echo $_code ?>_paypage_id').value,
				"reportGroup" : $('<?php echo $_code ?>_report_group').value,
				"orderId" : $('<?php echo $_code ?>_order_id').value,
				"id" : $('<?php echo $_code ?>_merchant_txn_id').value,
				"url" : ($('<?php echo $_code ?>_paypage_url').value)
			};

			var selectmenu=$("<?php echo $_code ?>_cc_vaulted");

			if(selectmenu){
				var chosenoption=selectmenu.options[selectmenu.selectedIndex]
				if (chosenoption.value == 0){
					if( _currentMethod == "creditcard" ){
						sendToLitle(litleRequest, formFields, setLitleResponseFields, onErrorAfterLitle);
					}
				}
			} else{
				if( _currentMethod == "creditcard" ){
					sendToLitle(litleRequest, formFields, setLitleResponseFields, onErrorAfterLitle);
				}
			}
			submitAfterLitle();
		}
	};
</script>
<?php endif; ?>

{'fraction_non_alphanumeric': 0.1987572388722154, 'fraction_numerical': 0.0033816629327471782, 'mean_word_length': 3.786162249645964, 'pattern_counts': {'":': 0, '<': 439, '<?xml version=': 0, '>': 527, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6027571', 'n_tokens_mistral': 8317, 'n_tokens_neox': 7782, 'n_words': 1781}