From 2b2b1d50905064d59002bad7f8d29944e6dbf11a Mon Sep 17 00:00:00 2001 From: phyusin Date: Mon, 11 Jun 2018 18:26:03 +0630 Subject: [PATCH] add msg reply for JunctionPay --- app/views/origami/junction_pay/index.html.erb | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/app/views/origami/junction_pay/index.html.erb b/app/views/origami/junction_pay/index.html.erb index aee32523..05b770c9 100755 --- a/app/views/origami/junction_pay/index.html.erb +++ b/app/views/origami/junction_pay/index.html.erb @@ -242,12 +242,24 @@ $('#junction_pay').on('click',function(){ }; resJunctionPay = function(memberno,transactionNo,finalBillingAmt){ - if(memberno != ''){ is_rebate = true; } + if(memberno != ''){ is_rebate = true; } }; - resError = function(err_message){ - $("#loading_wrapper").hide(); - swal ( "Oops" , err_message , "error" ); + resError = function(err_message){ + if(err_message != "ERROR: Verification cancelled"){ + $("#loading_wrapper").hide(); + swal({ + title: "Oops!", + text: err_message, + type: "error", + html: true, + closeOnConfirm: false, + closeOnCancel: false, + allowOutsideClick: false + }, function () { + window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type+"/payment/others_payment"; + }); + } }; // $("#loading_wrapper").hide(); // $.ajax({type: "POST",