Skip to content

Commit 1cdb2df

Browse files
committed
moving input * 100 into try block
1 parent 9ae2a21 commit 1cdb2df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/routes/api/checkout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ router.post('/create-checkout-session', async (req, res) => {
4747

4848
const input = formatDonationAmount(donationAmount)
4949
const inputIsValid = validateDonationAmount(input)
50-
const donationAmountForStripe = input * 100 // Stripe accepts values in cents
5150

5251
if (inputIsValid) {
52+
const donationAmountForStripe = input * 100 // Stripe accepts values in cents
5353
let session
5454

5555
try {

0 commit comments

Comments
 (0)