- Blockchain By Example
- Bellaj Badr Richard Horrocks Xun (Brian) Wu
- 50字
- 2021-06-10 18:53:35
Proceeding with payment
We then define the /ProcessingPayment route, which will be requested when the user clicks the Pay with BTC button to generate and render the bitcoin payment URL:
app.use(bodyParser.json());
app.post("/ProcessingPayment", function(req, res) {
var amount_ = req.body.amount;
var resp = compose_uri(amount_)+"?amount="+amount_;
res.send(resp);
});