Skip to content

Instantly share code, notes, and snippets.

let btn = document.getElementById('payButton');
btn.dataset.description = 'Payment for ' + document.getElementById('invoiceNumber').value;
btn.dataset.reference = document.getElementById('invoiceNumber').value;
btn.dataset.amount = parseInt(document.getElementById('amount').value * 100);
window.simplify||(function(d) {
var o=simplify=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='https://www.simplify.com/commerce/simplify.pay.js';h.appendChild(c);
})(document);