Customer invoice payment methods offline payment last step issue solved.
This commit is contained in:
parent
9a6d40e8e0
commit
f851f10e5b
@ -44,11 +44,4 @@ class OfflinePayment extends Controller
|
|||||||
'html' => $html,
|
'html' => $html,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function confirm(Invoice $invoice, ConfirmRequest $request)
|
|
||||||
{
|
|
||||||
$result = event(new InvoicePaid($invoice, $request));
|
|
||||||
|
|
||||||
return response()->json($result[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,4 @@ Route::group(['middleware' => ['web', 'auth', 'language', 'adminmenu', 'permissi
|
|||||||
|
|
||||||
Route::group(['middleware' => ['web', 'auth', 'language', 'customermenu', 'permission:read-customer-panel'], 'prefix' => 'customers', 'namespace' => 'Modules\OfflinePayment\Http\Controllers'], function () {
|
Route::group(['middleware' => ['web', 'auth', 'language', 'customermenu', 'permission:read-customer-panel'], 'prefix' => 'customers', 'namespace' => 'Modules\OfflinePayment\Http\Controllers'], function () {
|
||||||
Route::get('invoices/{invoice}/offlinepayment', 'OfflinePayment@show');
|
Route::get('invoices/{invoice}/offlinepayment', 'OfflinePayment@show');
|
||||||
Route::post('invoices/{invoice}/offlinepayment/confirm', 'OfflinePayment@confirm');
|
|
||||||
});
|
});
|
||||||
|
@ -10,7 +10,4 @@ return [
|
|||||||
'order' => 'Order',
|
'order' => 'Order',
|
||||||
'payment_gateways' => 'Offline Payment Methods',
|
'payment_gateways' => 'Offline Payment Methods',
|
||||||
|
|
||||||
'confirm' => 'Confirm',
|
|
||||||
'loading' => 'Loading',
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -4,36 +4,4 @@
|
|||||||
<div class="well well-sm">
|
<div class="well well-sm">
|
||||||
{{ $gateway['description'] }}
|
{{ $gateway['description'] }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@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: '{{ url("customers/invoices/" . $invoice->id . "/confirm") }}',
|
|
||||||
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>
|
|
Loading…
x
Reference in New Issue
Block a user