240 lines
7.3 KiB
Smarty
240 lines
7.3 KiB
Smarty
{include file='header.tpl'}
|
|
|
|
<script src="./include/js/semods.js"></script>
|
|
|
|
{literal}
|
|
<script>
|
|
Array.prototype.in_array = function(p_val) {
|
|
for(var i = 0, l = this.length; i < l; i++) {
|
|
if(this[i] == p_val) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function purchase_onclick(elem) {
|
|
elem.value = lang_payment_purchasing;
|
|
elem.disabled = true;
|
|
elem.form.submit();
|
|
}
|
|
|
|
function showcvvhint() {
|
|
var value = SEMods.B.ge("cc_type").value.toLowerCase();
|
|
if( ['visa','mastercard','discover','diners'].in_array(value)) {
|
|
SEMods.B.show("paymenthint_visa")
|
|
} else if(value == "american express") {
|
|
SEMods.B.show("paymenthint_amex")
|
|
}
|
|
}
|
|
|
|
function hidecvvhint() {
|
|
SEMods.B.hide("paymenthint_amex","paymenthint_visa");
|
|
}
|
|
|
|
// regions - only for US
|
|
function on_country_changed() {
|
|
if(SEMods.B.ge("cc_addr_country").value == "US") {
|
|
elem = SEMods.B.ge("cc_addr_state_type");
|
|
elem.disabled = true;
|
|
SEMods.B.hide(elem);
|
|
elem = SEMods.B.ge("cc_addr_state_select");
|
|
elem.disabled = false;
|
|
SEMods.B.show(elem);
|
|
} else {
|
|
elem = SEMods.B.ge("cc_addr_state_type");
|
|
elem.disabled = false;
|
|
SEMods.B.show(elem);
|
|
elem = SEMods.B.ge("cc_addr_state_select");
|
|
elem.disabled = true;
|
|
SEMods.B.hide(elem);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
div.error {
|
|
padding: 7px 8px 7px 7px;
|
|
font-weight: bold;
|
|
float: left;
|
|
background: #FFF3F3;
|
|
}
|
|
|
|
div.paymenthint {
|
|
color:#666666;
|
|
border: 1px dashed #DDD;
|
|
padding:20px;
|
|
Xbackground-color:#F8F8F8;
|
|
margin-left: 20px;
|
|
width: 260px;
|
|
}
|
|
|
|
div.form_desc {
|
|
color: #AAA;
|
|
}
|
|
</style>
|
|
{/literal}
|
|
|
|
<script>
|
|
var lang_payment_purchasing = '{lang_print id=100015157}';
|
|
</script>
|
|
|
|
<br>
|
|
|
|
|
|
<div style="padding-left: 20px;">
|
|
|
|
{* SHOW SUCCESS OR ERROR MESSAGE *}
|
|
{if $result != 0}
|
|
<div class='success'><img src='./images/success.gif' border='0' class='icon'> {lang_print id=$success_message}</div><br>
|
|
<div style="clear: both"></div>
|
|
{elseif $is_error != 0}
|
|
<div class="error"><img src='./images/error.gif' border='0' class='icon'> {$error_message}</div>
|
|
<div style="clear: both"></div>
|
|
<br>
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<div style="margin: 10px 10px 10px 0px; padding: 10px 10px 10px 30px; width: 478px; font-weight: bold; border: 1px dashed #DDD; Xbackground-color: #F6F6F6; background: url('./images/icons/payment_secure_lock.gif') no-repeat; background-position: 10px"> Secure 256-bit encrypted transaction </div>
|
|
|
|
<form action='payment_cc.php' method='POST'>
|
|
<input type='hidden' name='task' value='pay'>
|
|
<input type="hidden" name="paymentgw_id" value="{$paymentgw_id}">
|
|
|
|
<div class='signup_header'>{lang_print id=100015136}</div>
|
|
<table cellpadding='0' cellspacing='0'>
|
|
<tr>
|
|
<td class='form1' width='150'>{lang_print id=100015137}</td>
|
|
<td class='form2'>
|
|
<select name='cc_type' id='cc_type'>
|
|
{foreach from=$cctypes item=cctype}
|
|
<option name="{$cctype}" {if $cctype == $ccparams.cc_type}selected{/if}>{$cctype|capitalize}</option>
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
<td rowspan=6>
|
|
|
|
<div style="display:none" class="paymenthint" id="paymenthint_amex">
|
|
{lang_print id=100015138}<br><br>
|
|
<p> <!--<img src="./images/icons/payment/cv_amex_card.gif"/>-->
|
|
</p>
|
|
</div>
|
|
|
|
<div style="display:none" class="paymenthint" id="paymenthint_visa">
|
|
{lang_print id=100015139}<br><br>
|
|
<p> <!--<img src="./images/icons/payment/cv_card.gif"/>-->
|
|
</p>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1' Xwidth='100'>{lang_print id=100015140}</td>
|
|
<td class='form2'>
|
|
<input name='cc_cardholder_firstname' type='text' class='text' value='{$ccparams.cc_cardholder_firstname}'>
|
|
<div class='form_desc'>{lang_print id=100015141}</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1' Xwidth='100'>{lang_print id=100015142}</td>
|
|
<td class='form2'>
|
|
<input name='cc_cardholder_lastname' type='text' class='text' value='{$ccparams.cc_cardholder_lastname}'>
|
|
<div class='form_desc'>{lang_print id=100015143}</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1' Xwidth='100'>{lang_print id=100015144}</td>
|
|
<td class='form2'>
|
|
<input name='cc_number' type='text' class='text' value='{$ccparams.cc_number}'>
|
|
<div class='form_desc'>{lang_print id=100015145}</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1' Xwidth='100'>{lang_print id=100015146}</td>
|
|
<td class='form2'>
|
|
<select name='cc_exp_month'>
|
|
{foreach from=$months item=month}
|
|
<option value="{$month.value}" {if $month.value == $ccparams.cc_exp_month}selected{/if}>{$month.name}</option>
|
|
{/foreach}
|
|
</select>
|
|
<select name='cc_exp_year'>
|
|
{section name=cc_exp_year start=$cur_year loop=$cur_year+10} {* $cur_year *}
|
|
<option value="{$smarty.section.cc_exp_year.index}" {if $smarty.section.cc_exp_year.index == $ccparams.cc_exp_year}selected{/if}>{$smarty.section.cc_exp_year.index}</option>
|
|
{/section}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1' Xwidth='100'>{lang_print id=100015147}</td>
|
|
<td class='form2'>
|
|
<input name='cc_cvv' type='text' class='text' value='{$ccparams.cc_cvv}' onfocus="showcvvhint()" onblur=setTimeout("hidecvvhint()",200)>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<div class='signup_header'>{lang_print id=100015148}</div>
|
|
<table cellpadding='0' cellspacing='0'>
|
|
<tr>
|
|
<td class='form1' width='150'>{lang_print id=100015149}</td>
|
|
<td class='form2'>
|
|
<select name='cc_addr_country' id='cc_addr_country' onchange="on_country_changed()">
|
|
<option value="">{lang_print id=100015158}</option>
|
|
{foreach from=$countries item=country}
|
|
<option value="{$country.country_code}" {if $country.country_code == $ccparams.cc_addr_country}selected{/if}>{$country.country_name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1'>{lang_print id=100015150}</td>
|
|
<td class='form2'>
|
|
<input {if $ccparams.cc_addr_country == 'US'}disabled style="display:none"{/if} name='cc_addr_state' id='cc_addr_state_type' type='text' class='text' value='{$ccparams.cc_addr_state}'>
|
|
<select {if $ccparams.cc_addr_country != 'US'}disabled style="display:none"{/if} name='cc_addr_state' id='cc_addr_state_select'>
|
|
<option value="">{lang_print id=100015151}</option>
|
|
{foreach from=$regions item=region}
|
|
<option value="{$region.region_code}" {if $region.region_code == $ccparams.cc_addr_state}selected{/if}>{$region.region_name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1' Xwidth='100'>{lang_print id=100015152}</td>
|
|
<td class='form2'>
|
|
<input name='cc_addr_street' type='text' class='text' value='{$ccparams.cc_addr_street}'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1' Xwidth='100'>{lang_print id=100015153}</td>
|
|
<td class='form2'>
|
|
<input name='cc_addr_city' type='text' class='text' value='{$ccparams.cc_addr_city}'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1'>{lang_print id=100015154}</td>
|
|
<td class='form2'>
|
|
<input name='cc_addr_zip' type='text' class='text' value='{$ccparams.cc_addr_zip}'>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class='form1'>{lang_print id=100015155}</td>
|
|
<td class='form2'>
|
|
<input name='cc_addr_phone' type='text' class='text' value='{$ccparams.cc_addr_phone}'>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr><td colspan='2'> </td></tr>
|
|
<tr>
|
|
<td class='form1'> </td>
|
|
<td class='form2'><input type='submit' class='button' onclick="purchase_onclick(this); return true;" value='{lang_print id=100015156}'></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
|
|
{include file='footer.tpl'} |