| 15 | const order = JSON.parse(event.body) |
| 16 | |
| 17 | const calculateOrderAmount = items => { |
| 18 | // Replace this constant with a calculation of the order's amount |
| 19 | // You should always calculate the order total on the server to prevent |
| 20 | // people from directly manipulating the amount on the client |
| 21 | return 1400 |
| 22 | } |
| 23 | |
| 24 | try { |
| 25 | const intent = await stripe.paymentIntents.create({ |