Are you sure you want to go to an external site to donate a monetary value?
WARNING: Some countries laws may supersede the payment processors policy such as the GDPR and PayPal. While it is highly appreciated to donate, please check with your countries privacy and identity laws regarding privacy of information first. Use at your utmost discretion.
You need to consider different kind of currency in your script: if someone is using Euros (€) it will not work.
I just replaced all occurrences of '$' with the variable CURRENCY and now the script works.
Example:
ORIGINAL:
function formatPrice2(text){
return parseFloat(text.substring(text.indexOf('$') + 1));
}
MODIFIED:
//var CURRENCY = '$' ;
var CURRENCY = '€' ;
[...]
function formatPrice2(text){
return parseFloat(text.substring(text.indexOf(CURRENCY) + 1));
}