Important BUG in revolut.js – Checkout cannot work.
-
Hi, with some common and famous plugin for woocommerce (that enable checkout personalization), your plugin cannot work for a bug i found in the JS.
assets/js/revolut.js?ver=3.0.1
Line 170
i see:
function getAjaxURL(endpoint) { return wc_revolut.ajax_url.toString() + '=wc_revolut_' + endpoint; }
this line is wrong because the base AJAX URL could be modified by other plugins that added some querystring VAR in the url.
so, for example, if the base ajax_url became:"/?wc-ajax&wfacp_id=2784&wfacp_is_checkout_override=yes"
then the getAjaxURL(“process_payment_result”) function will return
“/?wc-ajax&wfacp_id=2784&wfacp_is_checkout_override=yes=wc_revolut_process_payment_result”
that obviously is an invalid url and is causing checkout to return an “INVALID RESPONSE” ERROR.Solution pourposed: split querystring of ajax_url or REGEX-replace wc_ajax querystring param in the ajax_url to inject your endpoint var.
- The topic ‘Important BUG in revolut.js – Checkout cannot work.’ is closed to new replies.