MCPcopy
hub / github.com/jamstack-cms/jamstack-ecommerce / calculateOrderAmount

Function calculateOrderAmount

snippets/lambda.js:17–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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({

Callers 1

lambda.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected