Online payments powered by crypto currency are essential in making crypto currency mainstream. However most of the successful SaaS companies rely on the business model of recurring payments which isn't currently possible. There are benefits to both the merchants using lunar pay and the customers paying with lunar pay.
All three of us are absolutely new to the web3 space and decided to learn the technology on the fly while developing the dApp. Since we were new, we encountered many challenges, but I am glad we were able to resolve most of them. Some of the main challenges were:
Limited Documentations
Since web3 and moralis are fairly new platforms, the documentation and online forum support was pretty limited, especially for react. We learnt along the way using a lot of trial and error as well as constant debugging.
Setting up CRON
When we were implementing our CRON based smart invoices, setting up cron was a massive challenge because we had to make sure it was setup reliably and would turn back on automatically. We also had to test every morning if the invoices were actually being sent. This took nearly a week of testing.
Signed Transactions Failed with Netlify and Heroku
We decided to host our web3 dApp on Netlify and Heroku. During testing, we realised that although the code was working on localhost. It was not working on netlify. Therefore we migrated to heroku. It did not work their either. The following error was present:
We think that the error could be because of mismatched libraries or their firewalls which prevented network traffic of the signed transaction.
We decided to switch to Google Cloud Platform and create a barebone Linux CentOS 8 virtual machine and deploy our application on it. The virtual machine gave us full control of the environment and the firewall settings. The application worked successfully on Google Cloud.
Problems with API and Library
While building the LunarPay react library and the API, we had to make sure that we made our code modular such that the same code can be used to power the API, the library and the dashboard itself. This was extremely challenging but we managed to do it by desiging our application modularly
Discussion