49 lines
1.5 KiB
PHP
Raw Normal View History

2020-03-06 16:24:17 +03:00
<div>
<div class="d-none">
@if (!empty($setting['name']))
<h2>{{ $setting['name'] }}</h2>
@endif
2020-03-06 16:24:17 +03:00
@if (!empty($setting['description']))
<div class="well well-sm">
{{ $setting['description'] }}
</div>
@endif
2019-11-16 10:21:14 +03:00
</div>
2020-03-06 16:24:17 +03:00
<br>
2018-12-18 12:55:19 +03:00
2020-03-06 16:24:17 +03:00
<div class="buttons">
<div class="pull-right">
<input type="button" value="{{ trans('offline-payments::general.confirm') }}" id="button-confirm" class="btn btn-success" data-loading-text="{{ trans('offline-payments::general.loading') }}" />
</div>
</div>
</div>
2020-03-06 16:24:17 +03:00
<script type="text/javascript"><!--
$('#button-confirm').on('click', function() {
$.ajax({
2019-11-16 10:21:14 +03:00
url: '{{ route("portal.invoices.offline-payments.confirm", $invoice->id) }}',
type: 'POST',
dataType: 'JSON',
2019-11-16 10:21:14 +03:00
data: {payment_method: '{{ $setting['code'] }}'},
cache: false,
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
beforeSend: function() {
$('#button-confirm').button('loading');
},
complete: function() {
$('#button-confirm').button('reset');
},
success: function(data) {
if (data['error']) {
alert(data['error']);
}
if (data['success']) {
location.reload();
}
}
});
});
2020-03-06 16:24:17 +03:00
//--></script>