<button id="button">Pay N1000</button>
document.addEventListener("DOMContentLoaded", function (event) {
const onload = (args) => {
console.log({ args });
};
const onclose = (args) => {
console.log("yayay i was closed");
};
const onsuccess = (args) => {
console.log({ args });
};
const fc = new Fluidcoins({
amount: 100000,
metadata: {
yaga: "oops",
key: "value",
moniker: "horus"
},
email: "your-email-address@gmail.com",
key: "pk_test_a934727e5be545f1bb27bd367750b5b5", // can switch to your live public key. Neve use your Secret key :)
//name: "Customer name", // This is optional
onLoad: onload,
onClose: onclose,
onSuccess: onsuccess,
});
fc.setup();
const button = document.getElementById("button");
button.addEventListener("click", function () {
fc.open();
});
});
This Pen doesn't use any external CSS resources.