purchase
If merchant decides to provide their own custom checkout button (hideButton: true) to work with the Hosted Payment Page loaded by fatzebra.js, they will need to call the checkout method in order to trigger the payment flow. This method sends a trigger to the Hosted Payment Page within iframe's content view.
const fz = new FatZebra({
username: 'xxx',
test: true
});
fz.renderPaymentsPage({...}) // omitted
const handler = function() {
fz.checkout();
}
document.getElementById('checkoutButton').addEventListener('click', handler);
Updated almost 2 years ago