We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bb5d30 commit 85c8464Copy full SHA for 85c8464
2 files changed
src/App.js
@@ -52,7 +52,7 @@ export default function App() {
52
</div>
53
<Cart itemsInCart={itemsInCart} totalCost={totalCost} />
54
{itemsInCart.length > 0 && (
55
- <StripeProvider apiKey="pk_test_TYooMQauvdEDq54NiTphI7jx">
+ <StripeProvider apiKey={process.env.REACT_APP_STRIPE_PUBLIC_KEY}>
56
<Elements>
57
<CheckoutForm totalCost={totalCost} />
58
</Elements>
src/lambda/charge.js
@@ -1,4 +1,5 @@
1
-const stripe = require('stripe')('sk_test_yaKbjP7rkSGdMeQtQvTMx4cG');
+require('dotenv').config();
2
+const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
3
4
exports.handler = (event, context, callback) => {
5
// This will allow us to freeze open connections to a database
0 commit comments