bumi / lnme

Your friendly Bitcoin Lightning ⚡ payment page ⚡
MIT License
164 stars 29 forks source link

Ticket sales funcionality #13

Open aplnx opened 2 years ago

aplnx commented 2 years ago

I forked this project to include an interesting functionality. You can check it out on https://github.com/aplnx/lnme (Changes are in tor-support source codes)

It allows you to sell tickets. The interface pulls the price from Binance. I did it in the way that the price exchange is calculated on the server-side, then it is unlikely that the price could be hacked (I hope at least! :) ). It works like that: 1 - Page shows the price in USD for a ticket and the respective amount in sats. The ticket has a fixed price in USD. 2 - If you click to buy, it generates an lnbtc invoice. 3 - It waits until the invoice is settled. 4 - It shows a ticked code after payment confirmation.

@bumi : Would you mind taking a look? I think the code Golang skills are not very good but the functionality is demonstrated anyway. You may use tickets.html inside the examples directory instead of index.html.

bumi commented 2 years ago

thanks for the idea and reporting. I've looked at your fork, but it seems some files are missing? did you commit all Go files? https://github.com/bumi/lnme/compare/tor-support...aplnx:tor-support?expand=1

aplnx commented 2 years ago

thanks for the idea and reporting. I've looked at your fork, but it seems some files are missing? did you commit all Go files? https://github.com/bumi/lnme/compare/tor-support...aplnx:tor-support?expand=1

Sorry. I am not used to Github. I have now ensure that files are in place. Please, let me know if you have any questions.