PageSourceSearch

https://honeywhale.co.nz/wp-content/cache/wpo-minify/1790987915/as…inify-footer-wc-zipmoney-script2.0.4.min.js

js honeywhale.co.nz collected 2026-10-04 04:09:42 UTC 4,259 bytes, 26 lines download raw bytes

1try{
2
3(function(window,$,undefined){"use strict";var iframeCheckout=function(vUrl,vType,form,vErrorMessage){this.vUrl=vUrl;this.vType=vType;this.vErrorMessage=vErrorMessage;this.form=form};iframeCheckout.prototype={standardRedirectToCheckout:function(){var $form=$('form.checkout');var self=this;if($form.is('.processing')){return!1}
4self.submit_error()
5var paymentMethod=$('#order_review').find('input[name="payment_method"]:checked').val();if($form.triggerHandler('checkout_place_order')!==!1&&$form.triggerHandler('checkout_place_order_'+paymentMethod)!==!1){$form.addClass('processing');var formData=$form.data();if(1!==formData['blockUI.isBlocked']){$form.block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}
6$.ajaxSetup({dataFilter:function(rawResponse,dataType){if('json'!==dataType){return rawResponse}
7try{var data=$.parseJSON(rawResponse);if(data&&'object'===typeof data){return rawResponse}}catch(e){var valid_json=rawResponse.match(/{"result.*"}/);if(null===valid_json){console.log("Unable to fix malformed JSON")}else{console.log("Fixed malformed JSON. Original:");console.log(rawResponse);rawResponse=valid_json[0]}}
8return rawResponse}});this.redirectToCheckout()}},redirectToCheckout:function(){var vUrl=this.vUrl;var vType=this.vType;var vErrorMessage=this.vErrorMessage;var data={};var method='GET';var self=this;if(this.form){method='POST';data=this.form.serialize()}
9this.showRedirectingText();$.ajax({type:method,dataType:"json",data:data,url:vUrl,success:function(response){self.resetRedirectButtonText();var vRedirectUrl="";try{if(response.result==='success'){if(-1===response.redirect.indexOf('https://')||-1===response.redirect.indexOf('http://')){vRedirectUrl=response.redirect}else{vRedirectUrl=response.redirect}
10if(typeof(zipMoney)!='undefined'){zipMoney.checkout(vRedirectUrl);$(".zipmoney-overlay img:first").on("click",function(){self.form.removeClass("processing")});window.scroll(0,0);self.form.unblock()}}else if(response.result==='failure'){throw 'Result failure'}else{throw 'Invalid response'}}catch(err){console.log(err);if(response.reload==='true'){window.location.reload();return}
11if(response.refresh==='true'){$(document.body).trigger('update_checkout')}
12if(response.messages){self.submit_error(response.messages)}else{self.submit_error('<div class="woocommerce-error">Error processing checkout. Please try again.</div>')}}},error:function(jqXHR,textStatus,errorThrown){self.submit_error('<div class="woocommerce-error">'+errorThrown+'</div>')}})},submit_error:function(error_message){$('.woocommerce-error, .woocommerce-message').remove();if(this.form){this.form.prepend(error_message);this.form.removeClass('processing').unblock();this.form.find('.input-text, select').blur();$('html, body').animate({scrollTop:(this.form.offset().top-100)},1000)}
13$(document.body).trigger('checkout_error')},showRedirectingText:function(){this.toggleButton(!1)},resetButton:function(vType){if(vType==='pdp'){this.toggleExpressButton(!0)}else if(vType==='cart'){this.resetRedirectButtonText()}},toggleExpressButton:function($bShowButton){if($bShowButton){$$('.zip-express-btn').each(function(oEle){if(oEle==undefined){return!0}
14oEle.show()});$$('.wait-for-redirecting-to-zip').each(function(oEle){if(oEle==undefined){return!0}
15oEle.hide()})}else{$$('.zip-express-btn').each(function(oEle){if(oEle==undefined){return!0}
16oEle.hide()});$$('.wait-for-redirecting-to-zip').each(function(oEle){if(oEle==undefined){return!0}
17oEle.show()})}},toggleButton:function($bShowButton){var cartButton=$('#checkout_express_cart');var checkoutButton=$('#place_order');var waitingImg=$('.please-wait');if($bShowButton){if(cartButton){cartButton.show()}
18if(checkoutButton){checkoutButton.show()}
19if(waitingImg){waitingImg.hide()}}else{if(cartButton){cartButton.hide()}
20if(checkoutButton){checkoutButton.hide()}
21if(waitingImg){waitingImg.show()}}},resetRedirectButtonText:function(){this.toggleButton(!0)}};window.iframeCheckout=iframeCheckout})(window,window.jQuery);
22
23
24
25}
26catch(e){console.error("WP-Optimize Minify: An error has occurred in the minified code. \n\n- Original script: https://honeywhale.co.nz/wp-content/plugins/zipmoney-payments-woocommerce/assets/js/woocommerce-zipmoney-payment-front.js\n- Error message: "+ e.message);}

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.