-
-
Save mtermoul/92a1c9c9e50aded4c0e3d50afc25a996 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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