A Pen by rahil khan on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<button class="pay-button">Pay</button> | |
<div id="status"></div> | |
</div> | |
<script type="text/javascript"> | |
window.addEventListener('load', async () => { | |
if (window.ethereum) { | |
window.web3 = new Web3(ethereum); | |
try { | |
await ethereum.enable(); |