1jQuery(document).ready(function(){ 2 3 jQuery('.select_all_bulk_action').on("change",function(){ 4 if( jQuery(this).prop('checked')){ 5 jQuery('.auth_order_detail_list').prop('checked', true); 6 }else{ 7 jQuery('.auth_order_detail_list').prop('checked', false); 8 } 9 10 }); 11 12 13 jQuery(".capture_amount").on("click",function() { 14 jQuery('#elex-auth-confirm-capture-toast').addClass("show"); 15 var order_id=jQuery(this).data("order-id"); 16 jQuery('.cancel_capture').on('click',function(){ 17 return; 18 }); 19 20 jQuery('.confirm_capture').on('click',function(){ 21 jQuery('#elex-auth-confirm-capture-toast').removeClass("show"); 22 23 var nonce= elex_auth_ajaxurl_object.nonce; 24 25 26 jQuery.ajax({ 27 type: 'POST', 28 url: elex_auth_ajaxurl_object.ajax_url, 29 data: { 30 action:'elex_authorize_net_capture_payment', 31 order_id: order_id, 32 nonce:nonce, 33 }, 34 success: function(response) { 35 if(response == 'Payment Captured Successfully'){ 36 jQuery('.innerText').html(response); 37 jQuery('#elex-auth-sucess-toast').addClass("show"); 38 setTimeout(function() { 39 40 jQuery("#elex-auth-sucess-toast").removeClass("show"); 41 window.location.reload(); 42 }, 3000); 43 }else{ 44 jQuery('.innerTextError').html(response); 45 jQuery('#elex-auth-error-toast').addClass("show"); 46 setTimeout(function() { 47 48 jQuery("#elex-auth-error-toast").removeClass("show"); 49 window.location.reload(); 50 }, 3000); 51 } 52 53 54 55 56 }, 57 error: function(jqXHR, textStatus, errorThrown) { 58 console.log(textStatus, errorThrown); 59 } 60 61 62 63 }); 64 }) 65 66 67 68 69 }); 70 71 jQuery(".refund_amount").on('click',function(){ 72 73 var order_id=jQuery(this).data("order-id"); 74 75 var method=jQuery(this).data("method"); 76 jQuery('#elex-auth-confirm-refund-toast').addClass("show"); 77 78 jQuery('.cancel_refund').on('click',function(){ 79 return; 80 }); 81 82 jQuery('.confirm_refund').on('click',function(){ 83 84 jQuery('#elex-auth-confirm-refund-toast').removeClass("show"); 85 86 var mode='Partial'; 87 var refund=0; 88 var type='card'; 89 if(jQuery(".full-refund-checked").is(":checked")){ 90 mode='full'; 91 } 92 refund=jQuery(".auth-refund-amount_"+order_id).val(); 93 94 if(method === 'eCheck Payment'){ 95 type='echeck'; 96 } 97 if(refund==''){ 98 99 100 jQuery('.innerTextError').html("Please Enter Refund Amount"); 101 jQuery('#elex-auth-error-toast').addClass("show"); 102 setTimeout(function() { 103 104 jQuery("#elex-auth-error-toast").removeClass("show"); 105 window.location.reload(); 106 }, 3000); 107 return; 108 } 109 var nonce= elex_auth_ajaxurl_object.nonce; 110 111 jQuery.ajax({ 112 type: 'POST', 113 url: elex_auth_ajaxurl_object.ajax_url, 114 data: { 115 action:'elex_authorize_net_refund_payment_'+type, 116 order_id: order_id, 117 refund_amount:refund, 118 refund_mode:mode, 119 nonce:nonce, 120 }, 121 success: function(response) { 122 123 if(response == 'Refund Processed Successfully'){ 124 jQuery('.innerText').html(response); 125 jQuery('#elex-auth-sucess-toast').addClass("show"); 126 setTimeout(function() { 127 128 jQuery("#elex-auth-sucess-toast").removeClass("show"); 129 window.location.reload(); 130 }, 3000); 131 }else{ 132 jQuery('.innerTextError').html(response); 133 jQuery('#elex-auth-error-toast').addClass("show"); 134 setTimeout(function() { 135 136 jQuery("#elex-auth-error-toast").removeClass("show"); 137 window.location.reload(); 138 }, 3000); 139 } 140 141 }, 142 error: function(jqXHR, textStatus, errorThrown) { 143 console.log(textStatus, errorThrown); 144 } 145 }); 146 }); 147 148 149 }); 150 151 jQuery(".full-refund-checked").on('click',function(){ 152 153 var order_price=jQuery(this).data("order-price"); 154 var order_id=jQuery(this).data("order-id"); 155 jQuery(".auth-refund-amount_"+order_id).val(order_price); 156 jQuery(".auth-refund-amount_"+order_id).prop("disabled",true); 157 }); 158 159 jQuery(".partial-refund-checked").on('click',function(){ 160 var order_id=jQuery(this).data("order-id"); 161 jQuery(".auth-refund-amount_"+order_id).val(null); 162 jQuery(".auth-refund-amount_"+order_id).prop("disabled",fal
162se); 163 }); 164 165 jQuery('.order-status-completed').on('click',function(){ 166 167 var order_id=jQuery(this).data('order-id'); 168 jQuery.ajax({ 169 type: 'POST', 170 url: elex_auth_ajaxurl_object.ajax_url, 171 data: { 172 order_id: order_id, 173 action: 'elex_authorize_net_order_status_completed', 174 nonce: elex_auth_ajaxurl_object.nonce, 175 176 }, 177 success: function(data) { 178 179 var response = jQuery.parseJSON(data); 180 location.reload(); 181 if (response.result !== false) { 182 183 184 185 } 186 187 188 } 189 }); 190 191 }); 192 193 jQuery('.auth-total-value').on('change',function(){ 194 var order_total=jQuery(this).data('total'); 195 var order_value=jQuery(this).val(); 196 197 console.log('hello'+order_total); 198 console.log(order_value); 199 if(order_value > order_total){ 200 jQuery(this).val(order_total); 201 } 202 }); 203 204 jQuery('.order-status-processing').on('click',function(){ 205 206 var order_id=jQuery(this).data('order-id'); 207 jQuery.ajax({ 208 type: 'POST', 209 url: elex_auth_ajaxurl_object.ajax_url, 210 data: { 211 order_id: order_id, 212 action: 'elex_authorize_net_order_status_processing', 213 nonce: elex_auth_ajaxurl_object.nonce, 214 215 }, 216 success: function(data) { 217 218 var response = jQuery.parseJSON(data); 219 location.reload(); 220 221 if (response.result !== false) { 222 223 } 224 225 } 226 }); 227 228 }); 229 230 jQuery('.auth_start_bulk_action').on('click',function(e) { 231 232 233 auth_bulk_action=jQuery('#auth_bulk_action_select').val(); 234 auth_bulk_ids=jQuery('.auth_order_detail_list:checkbox:checked'); 235 if (auth_bulk_ids.length == 0) { 236 return; 237 } 238 var auth_order_list = []; 239 for (var i = 0; i < auth_bulk_ids.length; i++) { 240 auth_order_list.push(jQuery(auth_bulk_ids[i]).attr('data-checkbox-id')); 241 } 242 243 jQuery.ajax({ 244 type: 'POST', 245 url: elex_auth_ajaxurl_object.ajax_url, 246 data: { 247 order_id: auth_order_list, 248 order_action: auth_bulk_action, 249 action: 'elex_authorize_net_order_status_update', 250 nonce: elex_auth_ajaxurl_object.nonce, 251 252 }, 253 success: function(data) { 254 var response = jQuery.parseJSON(data); 255 256 if (response.result !== false) { 257 jQuery('.auth_order_detail_list').prop('checked', false); 258 259 for (var j = 0; j < auth_order_list.length; j++) { 260 261 jQuery('.order_list_row_' + auth_order_list[j]).remove(); 262 jQuery(".select_all_bulk_action").prop('checked', false); 263 264 } 265 location.reload(); 266 267 } 268 } 269 }); 270 271 272 273 274 275 }); 276 277});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.