Skip to content

Instantly share code, notes, and snippets.

@mtermoul
Created May 17, 2019 15:18
Show Gist options
  • Save mtermoul/92a1c9c9e50aded4c0e3d50afc25a996 to your computer and use it in GitHub Desktop.
Save mtermoul/92a1c9c9e50aded4c0e3d50afc25a996 to your computer and use it in GitHub Desktop.
// server.js
...
app.post('/pay', function(req, res) {
stripe.charges.create({
amount: Number(req.body.amount) * 100, // amount in cents
currency: 'usd',
description: `${req.body.firstName} ${req.body.lastName} (${req.body.email}) - ${req.body.orderSummary} - Source: ${req.body.pageSource}`,
source: req.body.stripeToken,
statement_descriptor: 'CROWD-PITHC GOOG CASHM'
})
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment