151 lines
6.4 KiB
PHP
151 lines
6.4 KiB
PHP
@extends('web.layouts.pay')
|
|
@section('content')
|
|
|
|
<form id="FormPay" action="{{ route('web.merchant.order.post') }}" method="post" target="_blank" name="FormPay">
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
|
<input type="hidden" value="" name=pay_type id=channelID>
|
|
<input type="hidden" name="model_type" value="{{ $model_type }}">
|
|
<input type="hidden" name="model_id" value="{{ $model_id }}">
|
|
<input type="hidden" name="order_sn" value="{{ $order_sn }}">
|
|
|
|
<div class="tastesdk">
|
|
|
|
<div class="tastesdk-box">
|
|
<div class="main">
|
|
|
|
<div class="typedemo" style="display:block">
|
|
<div class=tit>提交支付订单</div>
|
|
<div class=demo-pc>
|
|
|
|
<div class="pay-jd" style="display:block">
|
|
<ul class="jdt">
|
|
<li>提交支付订单</li>
|
|
<li>选择支付方式</li>
|
|
<li>在线付款</li>
|
|
</ul>
|
|
<div class="first-step">
|
|
<div class="order-infor">
|
|
<h5>订单信息</h5>
|
|
<table border=0>
|
|
<tr>
|
|
<th></th>
|
|
<th>金额</th>
|
|
<th>总计</th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<span>在线充值</span>
|
|
|
|
</p>
|
|
</td>
|
|
<td id="amount_singel">¥{{ $money }}</td>
|
|
<td id="amount_total">¥{{ $money }}</td>
|
|
</tr>
|
|
</table>
|
|
<div class=pay-box>应付金额:<strong id="amount_order">{{ $money }}
|
|
<span></span></strong>
|
|
<button type="button" class="pcdemo-btn sbt-btn" ta=提交订单></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="two-step" style="display:block;margin-top: 20px;">
|
|
|
|
<h5>选择支付方式</h5>
|
|
<ul class=pay-label>
|
|
|
|
<li>
|
|
<input type=radio value=alipayscan name=channel id=alipayscan>
|
|
<label for=alipayscan style="width: 180px">
|
|
<img src="{{ $style_path }}/static/AliPay.png">
|
|
<span>支付宝扫码支付</span>
|
|
</label>
|
|
</li>
|
|
|
|
</ul>
|
|
<input type="hidden" name="regist_id" value="{{ $regist->id }}">
|
|
|
|
<div class=btns>
|
|
<button type="button" class="pcdemo-btn sbpay-btn">立即支付</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="confirm-pop" style="display:none;">
|
|
<div class=confirm>
|
|
<h4>确认支付</h4>
|
|
<p>请在新打开的页面进行支付!<span>支付完成前请不要关闭此窗口</span>
|
|
</p>
|
|
<div class=confirm-btns>
|
|
<button type="button" class="pay-ok" style="cursor: pointer">我已完成支付</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type=radio class="tab right" name=choosetypedemo>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
@endsection
|
|
@section('foot_js')
|
|
|
|
<script>
|
|
layui.use('jquery', function () {
|
|
var $ = layui.jquery;
|
|
$(".pay-ok").click(function () {
|
|
$.ajax({
|
|
url:'{{ route("web.merchant.order.check") }}',
|
|
method:'get',
|
|
data:{
|
|
_token:'{{ csrf_token() }}',
|
|
order_sn:'{{ $order_sn }}'
|
|
|
|
},
|
|
success:function (res) {
|
|
if(res.error==1)
|
|
{
|
|
layui.layer.msg(res.msg);
|
|
}else
|
|
{
|
|
layui.layer.alert(res.merchant.msg)
|
|
$(".merchant_url").attr('href', res.data.admin_url);
|
|
$(".merchant_url2").text( res.data.admin_url);
|
|
}
|
|
|
|
}
|
|
})
|
|
});
|
|
})
|
|
|
|
|
|
function clearNumber(obj) {
|
|
layui.use('jquery', function () {
|
|
var $ = layui.jquery;
|
|
|
|
obj.value = obj.value.replace(/[^\d.]/g, "");
|
|
obj.value = obj.value.replace(/^\./g, "");
|
|
obj.value = obj.value.replace(/\.{2,}/g, ".");
|
|
obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
|
|
|
|
var total = parseFloat(obj.value);
|
|
if (total > 0) {
|
|
$("#amount_singel,#amount_total,#amount_order").html("¥" + total);
|
|
$("#pay_order").html(total + "<span>元</span>");
|
|
$("#faceValue").val(total);
|
|
$(".res_amount").html(total);
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
@endsection |