jQuery(function(){
if (typeof ri !== 'undefined' && ri.changeOrder) {
ri.changeOrder = function(e, t){
e = 2000;
t = (typeof t === 'undefined') ? true : t;
clearInterval(ri.intervalId);
var n = ri.order_num_cookie("get");
if (!n) return false;
var i = function(e){
ri.ajax({
data: {
action: "zb_check_pay_status",
nonce: zb.ajax_nonce,
num: e
},
result: function(r){
if (r.status == 1) {
clearInterval(ri.intervalId);
ri.order_num_cookie("remove");
ri.notice(r.msg);
ri.popup(false);
setTimeout(function(){
window.location.href = r.back_url;
}, 2000);
}
}
});
};
if (t) i(n);
ri.intervalId = setInterval(function(){
var e = jQuery.cookie("_zb_current_order_num");
if (e) {
i(e);
return true;
} else {
clearInterval(ri.intervalId);
return false;
}
}, e);
};
}
});