Giter VIP home page Giter VIP logo

Comments (15)

pevey avatar pevey commented on August 17, 2024 1

Both the Medusa backend and the Stripe API have been updated since this starter was last updated. It will need to be tweaked to get it working again.

I no longer use Medusa. I use Vendure.

from sveltekit-medusa-starter.

fobtac avatar fobtac commented on August 17, 2024 1

@techydad05 that would be awesome! i'm fairly new to coding so you would definitely be better at solving this than i. i'll still keep digging though and keep you posted.

from sveltekit-medusa-starter.

techydad05 avatar techydad05 commented on August 17, 2024

Did you ever solve this problem?

from sveltekit-medusa-starter.

fobtac avatar fobtac commented on August 17, 2024

Did you ever solve this problem?

Unfortunately not yet. Are you having the same issue?

from sveltekit-medusa-starter.

techydad05 avatar techydad05 commented on August 17, 2024

@fobtac yes Im having the same issue and Ill start figuring out how to make it work again. Ill let ya know when I do.

from sveltekit-medusa-starter.

dianaow avatar dianaow commented on August 17, 2024

@fobtac @techydad05 did you manage to find a solution? I am encountering the same error when integrating stripe. The returned cart variable is undefined because the post request failed. The error occurs\when creating a payment session with Medusa, with the 404 response error message being: 'Could not find a payment provider with id: stripe'

I have already set up stripe on the Medusa backend and admin. Unfortunately, documentation doesn't divulge anything else useful beyond setting up the stripe plugin.
https://docs.medusajs.com/plugins/payment/stripe

from sveltekit-medusa-starter.

clemsos avatar clemsos commented on August 17, 2024

This worked our of the box for me on a fresh install. I just add to enable stripe (with local CLI) on the server and turnstile on the (local) client.

from sveltekit-medusa-starter.

dianaow avatar dianaow commented on August 17, 2024

@clemsos Do you mean to generate the Client Secret for the payment intent with Stripe instead of Medusa?

I keep on trying to make medusa.carts.setPaymentSession(locals.cartid, { provider_id: 'stripe'}) return without any errors because I want to obtain the Client Secret from it's response

from sveltekit-medusa-starter.

clemsos avatar clemsos commented on August 17, 2024

@dianaow I had the same error as @fobtac initially but it turned out that looking at the logs of the backend server stripe wasn't enable correctly. I used the stripe shell cli to start a localhost test session, which provided me with a webhook secret that I added in the .env of the backend server as STRIPE_WEBHOOK_SECRET (as well as the sk... secret). I had also added api key and secret to the .env of the svelte app. That worked correctly after that

from sveltekit-medusa-starter.

dianaow avatar dianaow commented on August 17, 2024

@clemsos Oh ok, yes I read about the stripe webhooks from the medusa docs (https://docs.medusajs.com/plugins/payment/stripe) but assumed it wasn't needed now because i'm not in production mode. i only want to test the plugin

from sveltekit-medusa-starter.

pevey avatar pevey commented on August 17, 2024

If you are new to Medusa and just testing it out, I strongly recommend you look at Vendure instead. https://github.com/pevey/sveltekit-vendure-starter

from sveltekit-medusa-starter.

dianaow avatar dianaow commented on August 17, 2024

@clemsos unfortunately, setting up the webhooks, starting up 'localhost:4242/webhooks ', and specifying the webhook signing secret in .env file didn't resolve the issue. How did you identify that stripe wasn't setup properly through looking at the backend logs?
Screenshot 2024-03-07 at 7 09 40 PM

I could generate a payment intent from Stripe instead of through the Medusa API call (to select a payment session) and trigger a test payment successfully upon form submission. However, I still want to tie both Medusa and Stripe together, so that the Medusa admin knows about the order. Also, without a payment session selected, I get the same 'Could not find a payment provider with id: stripe' when an address/shipping option update is submitted through the Stripe form.

My last resort is to just reinstall the medusa backend and admin.

Are you using live or test Stripe API keys?

from sveltekit-medusa-starter.

pevey avatar pevey commented on August 17, 2024

If you are using Medusa's stripe plugin, http://localhost:4242 is not the correct webhooks url. Please consult the documentation.

from sveltekit-medusa-starter.

dianaow avatar dianaow commented on August 17, 2024

@pevey Oh right, thank you! It should be localhost:9000/stripe/hooks

from sveltekit-medusa-starter.

JoaquinPiersigilli avatar JoaquinPiersigilli commented on August 17, 2024

@pevey Can I asked why you moved from medusa to vendure?

from sveltekit-medusa-starter.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.