40 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <h2>{{ $gateway['name'] }}</h2>
 | |
| 
 | |
| @if ($gateway['description'])
 | |
| <div class="well well-sm">
 | |
|     {{ $gateway['description'] }}
 | |
| </div>
 | |
| @endif
 | |
| <div class="buttons">
 | |
|     <div class="pull-right">
 | |
|         <input type="button" value="{{ trans('offlinepayment::offlinepayment.confirm') }}" id="button-confirm" class="btn btn-success" data-loading-text="{{ trans('offlinepayment::offlinepayment.loading') }}" />
 | |
|     </div>
 | |
| </div>
 | |
| <script type="text/javascript"><!--
 | |
|     $('#button-confirm').on('click', function() {
 | |
|         $.ajax({
 | |
|             url: '{!! urldecode($confirm_action) !!}',
 | |
|             type: 'POST',
 | |
|             dataType: 'JSON',
 | |
|             data: {payment_method: '{{ $gateway['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();
 | |
|                 }
 | |
|             }
 | |
|         });
 | |
|     });
 | |
|     //--></script>
 |