Skip to content

Commit

Permalink
as
Browse files Browse the repository at this point in the history
  • Loading branch information
carloquer committed Jul 31, 2024
1 parent 4f5e8de commit 27903b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/SubscriptionPlans.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SubscriptionPlans = () => {

const handleSelectPlan = async (plan) => {
const stripe = await stripePromise;
const response = await axios.post('http://localhost:3000/create-subscription', {plan});
const response = await axios.post('http://localhost:3000/create-subscription', { plan });
const sessionId = response.data.id;
const { error } = await stripe.redirectToCheckout({ sessionId });
if (error) {
Expand Down
8 changes: 4 additions & 4 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ app.get('/', (req, res) => {

// Ruta para crear suscripciones
const plans = {
basic: 'prod_QZQxUPasqnWTnQ',
standard: 'prod_QZQyJ63xRZmXzz',
advanced: 'prod_QZQzaImU9ydUXt',
premium: 'prod_QZQz9jbWS2m32i'
basic: 'price_1PiI5X2KRPeDwuZFwN9hhxto',
standard: 'price_1PiI6M2KRPeDwuZFMUoB5DrU',
advanced: 'price_1PiI732KRPeDwuZFV3XclDU3',
premium: 'price_1PiI7c2KRPeDwuZFU22BMEdq'
};

app.post('/create-subscription', async (req, res) => {
Expand Down

0 comments on commit 27903b4

Please sign in to comment.