www.lightcourse.com/app/home/view/default/member/buy/buy_step2.html

546 lines
11 KiB
HTML
Raw Normal View History

2022-10-24 02:38:36 +00:00
{include file="default/base/mall_top" /}
<style>
.dsc-bottom{
display: flex;
justify-content:flex-end;
}
</style>
<script src="https://js.stripe.com/v3/"></script>
<link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/home_cart.css">
<style>
.dsc-main{
margin-bottom: 3rem;
}
#buy_form *,
.dsc-main *{
box-sizing: content-box !important;
}
#buy_form .tr{
text-align: right !important;
}
#buy_form th:last-of-type,
#buy_form td:last-of-type{
display: none;
}
a.dsc-btn-green{
background-color: #3b52f6 !important;
color: #fff !important;
border: none;
}
.dsc-table-style{
border: none;
}
</style>
<style>
.dsc-main {
padding: 5rem 0;
}
#buy_form *{
box-sizing: content-box;
}
#buy_form .tr{
text-align: right !important;
}
.dsc-receipt-info-title a{
color: #3b52f6;
}
.dsc-receipt-info.current_box{
border-color: #3b52f6;
}
a.dsc-btn-red,a.dsc-btn-acidblue{
background-color: #3b52f6 !important;
color: #fff !important;
border: none;
}
.dsc-main{
margin-bottom: 3rem;
}
.dsc-table-style{
border: none;
}
.dsc-main tbody tr:nth-of-type(2){
display: none;
}
.dsc-title{
height: auto;
border-top: none;
margin-bottom: 3rem;
}
.dsc-receipt-info{
padding: 0;
border: none;
}
.dsc-receipt-info-title h3, .dsc-receipt-info-title a{
font-size: 1rem;
font-family: 'robotomedium'!important;
}
.dsc-receipt-info-title p{
font-family: 'robotomedium'!important;
}
#paymentCon{
display: none;
}
</style>
<style>
.dsc-table-style thead th{
background-color: transparent;
}
.dsc-table-style tbody tr td{
border-bottom: none;
}
.dsc-receipt-info{
margin: 2rem 0;
}
a.dsc-btn-green{
border-radius: .2rem;
}
.dsc-payment-list li:hover, .dsc-payment-list li.using{
border-color: #3b52f6;
}
.dsc-payment-list li.using i{
background-image: none;
}
</style>
<script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
<div class="dsc-main">
<div class="dsc-title">
<h2>Submit Payment</h2>
<p>Order details can be found in the Previous Orders.</p>
</div>
<form action="/Payment/stripe" method="POST" id="buy_form">
<input type="hidden" name="pay_sn" value="{$pay_info.pay_sn}">
<input type="hidden" id="payment_code" name="payment_code" value="">
<input type="hidden" name="stripe" value="pk_live_51KGYh8LqMBqucQSD2C0rnD6vL6D6fejrkPn7mPEMCGKx9apA4KnugesCAgav5nvlJsoh6Q1ERYoNZ5gcRotv2rWF00wrzRwWxc">
<!-- <input type="hidden" name="stripe" value="pk_test_51KGYh8LqMBqucQSD2uJGSrRKTyT8NCZPCglWRBSoRPapyKE6cdqnURGI8ojQfWJxMr6tUBAp6vRVsaoGGPxH6OoV00JCtGoLBq">
-->
<div class="dsc-receipt-info">
<div class="dsc-receipt-info-title">
<h3>
<p style="font-size:18px;">Please submit payment in time to process your order as soon as possible! Online payment amount</p>
</h3>
</div>
<table class="dsc-table-style" style="margin-top:50px;">
<thead>
<tr>
<th>Order Number</th>
<th>Payment Method</th>
<th>Amount</th>
<th></th>
</tr>
</thead>
<tbody>
{if count($order_list)>1}
<!-- <tr>
<th colspan="20">{$Think.lang.different_businesses}{:count($order_list)}{$Think.lang.different_suborder_deliveries}</th>
</tr>-->
{/if}
{foreach name="order_list" item="order" key="key" }
<tr>
<!-- <td>{$order.ke_simple_college}</td>
<td>{$order.goods_serial}</td>
<td>{$order.goods_name}</td>
<td>{$order.ke_credit}</td>
<td>{$order.ke_institution}</td>
<td>{$order.ke_start_time}</td>
<td>{$order.ke_end_time}</td>
<td>${$order.goods_price}</td>-->
<td>{$order.order_sn}</td>
<td>Online</td>
<td>${$order.order_amount}</td>
<td></td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<!-- S 预存款 & 充值卡 -->
{if $pay_amount_online>0 && (!empty($available_pd_amount) || !empty($available_rcb_amount))}
<div id="pd_panel">
<div class="pd-account" colspan="6"><div class="dsc-pd-account">
{notempty name="available_rcb_amount"}
<div class="mt5 mb5">
<label>
<input type="checkbox" class="vm mr5" value="1" name="rcb_pay">
{$Think.lang.use_top_up_cards}<em>{$available_rcb_amount}</em>{$Think.lang.ds_yuan}
</label>
</div>
{/notempty}
{notempty name="available_pd_amount"}
<div class="mt5 mb5">
<label>
<input type="checkbox" class="vm mr5" value="1" name="pd_pay">
{$Think.lang.pre_deposit}<em>{$available_pd_amount}</em>{$Think.lang.ds_yuan}</label>
</div>
{/notempty}
{if !empty($available_pd_amount) && !empty($available_rcb_amount)}
<div class="mt5 mb5">{$Think.lang.system_priority}&nbsp;&nbsp;</div>
{/if}
<div id="pd_password" style="display: none">{$Think.lang.pay_the_password}{$Think.lang.pay_the_password_tips}
<input type="password" class="text w120" value="" name="password" id="pay-password" maxlength="35" autocomplete="off">
<input type="hidden" value="" name="password_callback" id="password_callback">
<a class="dsc-btn-mini dsc-btn-orange" id="pd_pay_submit" href="javascript:void(0)">{$Think.lang.use}</a>
{if !$member_paypwd}
{$Think.lang.no_payment_password_set}<a href="{:url('Membersecurity/auth',['type'=>'modify_paypwd'])}" target="_blank">{$Think.lang.set_up_immediately}</a>
{/if}
</div>
</div>
</div>
</div>
{/if}
<!-- E 预存款 -->
<div class="dsc-receipt-info">
{notempty name="payment_list"}
<div class="dsc-receipt-info-title">
</div>
<ul class="dsc-payment-list">
{foreach name="payment_list" item="val"}
{if $val.payment_code=='allinpay'}
{php}$sub_payment_list=array('W01','A01','Q01','U01');{/php}
<input type="hidden" id="{$val.payment_code}_sub_payment_code" name="paytype" value="">
{else}
{php}$sub_payment_list=array('');{/php}
{/if}
{foreach name="sub_payment_list" item="sub"}
<p style="font-size:18px;margin-top:50px;">Payment Method:</p>
<li payment_code="{$val.payment_code}" sub_payment_code="{$sub}">
<label>
<i></i>
<div class="logo" for="pay_{$val.payment_code}"> <img src="{$Think.HOME_SITE_ROOT}/images/payment/{$val.payment_code}{notempty name='sub'}_{$sub}{/notempty}_logo.png" /> </div>
</label>
</li>
{/foreach}
{/foreach}
</ul>
{else /}
{/notempty}
</div>
{if $pay_amount_online > 0}
<div class="dsc-bottom tc mb50"><a href="javascript:void(0);" id="next_button" class="dsc-btn dsc-btn-green" style="width:200px;">Confirm Payment</a></div>
{/if}
</form>
</div>
<script type="text/javascript">
$(function(){
var ifSubmit=false
$('.dsc-payment-list > li').on('click',function(){
$('.dsc-payment-list > li').removeClass('using');
$(this).addClass('using');
$('#payment_code').val($(this).attr('payment_code'));
if($(this).attr('sub_payment_code')!=''){
$('#'+$(this).attr('payment_code')+'_sub_payment_code').val($(this).attr('sub_payment_code'));
}
});
$('.dsc-payment-list > li:eq(0)').click()
$('#next_button').on('click',function(){
if ($('#payment_code').val() == '') {
layer.alert('{$Think.lang.cart_step2_choose_pay_method}');
return false;
}
if (($('input[name="pd_pay"]').prop('checked') || $('input[name="rcb_pay"]').prop('checked')) && $('#password_callback').val()==''){
ifSubmit=true
$('#pd_pay_submit').click()
return false;
}
$('#buy_form').submit();
});
{if !empty($available_pd_amount) || !empty($available_rcb_amount)}
function showPaySubmit() {
if ($('input[name="pd_pay"]').prop('checked') || $('input[name="rcb_pay"]').prop('checked')) {
$('#pay-password').val('');
$('#password_callback').val('');
$('#pd_password').show();
} else {
$('#pd_password').hide();
}
}
$('#pd_pay_submit').on('click',function(){
if ($('#pay-password').val() == '') {
ifSubmit=false
layer.alert('{$Think.lang.enter_payment_password}');return;
}
$('#password_callback').val('');
var url = HOMESITEURL+'/Buy/check_pd_pwd.html'
$.post(url, {'password':$('#pay-password').val()}, function(data){
if (data == '1') {
$('#password_callback').val('1');
$('#pd_password').hide();
if(ifSubmit){
$('#buy_form').submit();
}
} else {
ifSubmit=false
$('#pay-password').val('');
layer.alert('{$Think.lang.payment_password_error}');return;
}
});
});
{/if}
{if !empty($available_rcb_amount)}
$('input[name="rcb_pay"]').on('change',function(){
showPaySubmit();
if ($(this).prop('checked') && !$('input[name="pd_pay"]').prop('checked')) {
if ({$available_rcb_amount} >= parseFloat($('#orderTotal').html())) {
$('input[name="pd_pay"]').prop('checked',false).prop('disabled',true);
}
} else {
$('input[name="pd_pay"]').prop('disabled',false);
}
});
{/if}
{if !empty($available_pd_amount)}
$('input[name="pd_pay"]').on('change',function(){
showPaySubmit();
if ($(this).prop('checked') && !$('input[name="rcb_pay"]').prop('checked')) {
if ({$available_pd_amount} >= parseFloat($('#orderTotal').html())) {
$('input[name="rcb_pay"]').prop('checked',false).prop('disabled',true);
}
} else {
$('input[name="rcb_pay"]').prop('disabled',false);
}
});
{/if}
});
</script>
<style>
.pd-account { background-color: #FFAA01; padding: 2px;}
</style>
{include file="default/base/mall_footer" /}