Skip to content

Muestra un QR para procesar pagos online hecho con stenciljs

License

Notifications You must be signed in to change notification settings

paxapos/qr-payment-component

Repository files navigation

qr-pay

Generates a QR using href property and shows a checkmark if the done prop is present

<qr-pay href="URL"/>

(show QR of passed URL)

<qr-pay href="URL" done />

(show DONE CHECK MARK)

How dows it works?

<script type="module">
   // import stencil js component
   import { defineCustomElements } from "https://cdn.jsdelivr.net/npm/[email protected]/dist/loader/index.es2017.js";
   defineCustomElements();
</script>

<!-- YOUR HTML STUFF -->

<qr-pay id="qr" href="ANY_TEXT_CANT_GO_HERE" width=180></qr-pay>

<button onclick="done()">DONE</button>
<button onclick="undone()">UNDONE</button>


<script>
  // with JS change "done" property for showing the checkmark
  const qr = document.getElementById("qr");
  const done = () => qr.setAttribute("done", true);
  const undone = () => qr.setAttribute("done", false);
</script>

About

Muestra un QR para procesar pagos online hecho con stenciljs

Resources

License

Stars

Watchers

Forks

Packages

No packages published