- Blockchain By Example
- Bellaj Badr Richard Horrocks Xun (Brian) Wu
- 86字
- 2021-06-10 18:53:36
Invoicing
Finally, the system would be complete if it enabled the merchant to invoice the clients. For this purpose, you can add to your system a database-based invoice system to store the purchase invoices for future access. We can define an /invoice handler to provide the invoice details to the requester:
app.get("/invoice", urlencodedParser, function(req, res) {
var invoice_id = req.query.id;
var detail="details about the invoice N:"+invoice_id;
/*....invoice Database access..*/
res.send(detail);
});
Now, as the server is ready, we need to proceed to building the frontend part.