I am using a serverless lambda function to run Stripe payments.
In my server function i have the following…
const stripe = require(‘stripe’)(process.env.STRIPE_SECRET_KEY);
i have a .env file with the SK in there, and this works when running on localhost. But it doesnt work when i deploy.
I have added the SK in Netlify’s dashboard
But it doesnt work for me, what am i doing wrong?