var getUrlParameter = function getUrlParameter(sParam)
{
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
};
jQuery(document).ready(function()
{
jQuery('table.wp-list-table #the-list').sortable({
placeholder: {
element: function(currentItem) {
var cols = jQuery(currentItem).children('td:visible').length + 1;
return jQuery('
| |
')[0];
},
update: function(container, p) {
return;
}
},
'items': 'tr',
'axis': 'y',
'update' : function(e, ui) {
var post_type = CPTO.post_type;
var order = jQuery('#the-list').sortable('serialize');
var paged = getUrlParameter('paged');
if(typeof paged === 'undefined')
paged = 1;
var queryString = { "action": "update-custom-type-order-archive", "post_type" : post_type, "order" : order ,"paged": paged, "archive_sort_nonce" : CPTO.archive_sort_nonce};
//send the data through ajax
jQuery.ajax({
type: 'POST',
url: ajaxurl,
data: queryString,
cache: false,
dataType: "html",
success: function(data){
},
error: function(html){
}
});
}
});
});
class MPSuperTokenAuthenticator{AMOUNT_ELEMENT_ID="mp-amount";PLATFORM_ID=wc_mercadopago_supertoken_bundle_params.platform_id;SUPER_TOKEN_VALIDATION_ELEMENT_ID="super_token_validation";AUTHORIZED_PSEUDOTOKEN_ELEMENT_ID="authorized_pseudotoken";amountUsed=null;emailUsed=null;authenticator=null;fastPaymentToken=null;mpSdkInstance=null;mpSuperTokenPaymentMethods=null;mpSuperTokenMetrics=null;constructor(t,e,n){this.mpSdkInstance=t,this.mpSuperTokenPaymentMethods=e,this.mpSuperTokenMetrics=n}reset(){this.authenticator=null,this.fastPaymentToken=null}setSuperTokenValidation(t){const e=document.getElementById(this.SUPER_TOKEN_VALIDATION_ELEMENT_ID);e&&(e.value=t?"true":"false")}getAmountUsed(){return this.amountUsed}getEmailUsed(){return this.emailUsed}storeAuthenticator(t){this.authenticator=t}getStoredAuthenticator(){return this.authenticator}storeFastPaymentToken(t){this.fastPaymentToken=t}getStoredFastPaymentToken(){return this.fastPaymentToken}formatAmount(t=""){const e=t?.replace(/[^\d.,]/g,"");if(!e)return null;const n=e.lastIndexOf(",")>e.lastIndexOf("."),r=e.replace(/[.,]/g,((t,e)=>n?","===t?".":"":"."===t?".":"")),o=parseFloat(r);return isNaN(o)?null:o.toFixed(2)}async buildAuthenticator(t,e){try{this.amountUsed=t,this.emailUsed=e;const n=window.callSdkWithMetrics||(t=>t()),r=await n((()=>this.mpSdkInstance.authenticator(t,e,{platformId:this.PLATFORM_ID,version:2})),"buildAuthenticator");return r||(this.mpSuperTokenMetrics.sendMetric("super_token_authenticator_falsy",String(r),"typeof:"+typeof r),null)}catch(t){return this.mpSuperTokenMetrics.errorToBuildAuthenticator(t),null}}async getSimplifiedAuth(t){try{return t?await t.getSimplifiedAuth():(this.mpSuperTokenMetrics.sendMetric("super_token_authenticator_null","getSimplifiedAuth",""),!1)}catch(t){return this.mpSuperTokenMetrics.errorToGetSimplifiedAuth(t),!1}}async getFastPaymentToken(t){try{return t?await t.getFastPaymentToken():(this.mpSuperTokenMetrics.sendMetric("super_token_authenticator_null","getFastPaymentToken",""),null)}catch(t){return this.mpSuperTokenMetrics.errorToGetFastPaymentToken(t),null}}storeAuthorizedPseudotoken(t){const e=document.getElementById(this.AUTHORIZED_PSEUDOTOKEN_ELEMENT_ID);this.mpSuperTokenMetrics.registerAuthorizedPseudotoken(t,!!e),e&&(e.value=t)}async getAccountPaymentMethods(t,e){try{const n=await this.buildAuthenticator(t,e);if(!n)return null;this.storeAuthenticator(n);if(!await this.getSimplifiedAuth(n))return this.mpSuperTokenMetrics.isNotSimplifiedAuth(),null;document.dispatchEvent(new CustomEvent("mp-behavior-tracking-super-token-init")),this.mpSuperTokenMetrics.canUseSuperToken(!0);const r=await this.getFastPaymentToken(n);if(!r)return this.mpSuperTokenMetrics.cannotGetFastPaymentToken(),null;this.storeFastPaymentToken(r);const o=await this.mpSuperTokenPaymentMethods.getAccountPaymentMethods(r);if(!o?.data?.length)throw new Error(MPSuperTokenErrorCodes.EMPTY_ACCOUNT_PAYMENT_METHODS);return o.data}catch(t){return this.mpSuperTokenMetrics.errorToGetAccountPaymentMethods(t),null}}async authorizePayment(t){try{const e=this.getStoredAuthenticator();if(!e)throw new Error(MPSuperTokenErrorCodes.AUTHENTICATOR_NOT_FOUND);if(!await this.getSimplifiedAuth(e))return void this.mpSuperTokenMetrics.sendMetric("super_token_auth_expired_on_submit","true","");const n=window.callSdkWithMetrics||(t=>t());await n((()=>e.authorizePayment(t)),"authorizePayment"),this.storeAuthorizedPseudotoken(t)}catch(t){if(this.mpSuperTokenMetrics.errorToAuthorizePayment(t),t?.message?.includes("USER_CANCELLED"))throw new Error(MPSuperTokenErrorCodes.AUTHORIZE_PAYMENT_METHOD_USER_CANCELLED);throw new Error(MPSuperTokenErrorCodes.AUTHORIZE_PAYMENT_METHOD_ERROR)}}}
https://actionchapel.org.uk/post-sitemap.xml
2026-07-24T13:15:14+00:00
https://actionchapel.org.uk/page-sitemap.xml
2026-09-07T12:31:35+00:00
https://actionchapel.org.uk/category-sitemap.xml
2026-07-22T13:15:12+00:00