NanoBrowserQuest — Technical guide for accepting nano payments

  • Database: Redis
  • Server: Nodejs & Typescript
  • Client: jQuery, Typescript & Webpack
  • If you peg your items prices to fiat, you’ll have to poll a pricing API (like CoinGecko) at regular intervals and handle the case where the API is not responding or having a fallback solution. Like displaying a “Shop not available” to your users or try a second API like CMC
  • Websocket disconnects, re-add listeners for the ongoing payment sessions
  • You could consider adding a manual “Verify transaction” button in your interface that does a RPC call on the deposit account for the last transaction history in case the socket was disconnected at the exact time the transaction was recorded on the nano node
  • Logging the customer journey though your payment flow is very important for successes and failures handling to keep improving robustness
  • If you are building for the long term, an automated and complete test suite is vital to preserve functionality in-between releases. Don’t only aim for 90–100% coverage but also testing all the possible outcomes. Most of the time you’ll end up finding bugs while writing tests
  • Reporting and monitoring tools for medium to large scale projects. You want to be alerted as soon as the payment system emits a failure to be able to display a notification to your players and provide a fix when possible

NBQ payment service architecture

The player purchase journey (client-side flow)

Fig. 1 — List the items stored in database
Fig. 2 — An item is selected by the player
Fig.3 — Item is purchased

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

MatrixPerp Mainnet is Live!

How will coding be relevant in the future?

SpringBoot: Rule Engine For Classifying Celestial Objects

Presearch Weekly Update #32 — September 10th, 2021

DUNZO Clone..

How to customize / prevent Dockfixup on macOS

Adding Audio: Making the Characters Speak! (Game Dev Day 56)

Python Beginner — Day 03 to Day 07

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
running-coder

running-coder

More from Medium

CS371p Spring 2022 Week 2/14–2/20

CS373 Spring 2022: Akshay Sharma

CryptoCubs State of Union 2021–2022

CS 373 Spring 2022: Anthony Chhang