How can I write a function for someone to pay with MetaMask before having access to the site?
I guess that you want to restrict access to a part of the site based on that payment?
Yeah exactly like a payed site, you gat to pay before having access to the site
What is the issue that you have? What you don’t know how to do?
I create a button that tell’s user to pay before accessing the site but I can’t figure out the functionality, I mean I’ve no ideal how to make it work with MetaMask and molaris
You may need to use your own backend.
You have to be able to check what addresses what transfers made in order to be able to check the payment. You can do that with the api for example. You will be able to do that part with the payment that should be easy. You should find examples in documentation on how to use Moralis.transfer.
Okay thanks a lot really appreciate