diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 68f843a7..36c4cc0e 100644 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -454,17 +454,12 @@ $('#foc').click(function() { $.ajax({type: "POST", url: "<%= origami_payment_foc_path %>", data: params, - success:function(result){ - localStorage.removeItem("cash"); - if (result.status) { - var msg = result.message; - } - else{ - var msg = ''; - } - $( "#loading_wrapper" ).hide(); + success:function(result){ - $.confirm({ + $( "#loading_wrapper" ).hide(); + + if (cash > 0) { + $.confirm({ title: 'Infomation!', content: 'Thank you !', buttons: { @@ -477,6 +472,7 @@ $('#foc').click(function() { } } }); + } } });