medusajs / b2b-starter-medusa

Official Medusa B2B Starter template. Features common B2B ecommerce requirements and can be easily adapted and extended.
https://dub.sh/medusa-b2b-starter
MIT License
141 stars 42 forks source link

Payment with Stripe doesn't work in this storefront #51

Closed rida-rechrache closed 1 month ago

rida-rechrache commented 1 month ago

Hello, I attempted to set up Stripe in this storefront and followed this guide: https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment/stripe, but it isn’t working due to the following error:

image

I don't understand we already have the provider in the payment-wrapper, but I don’t know why this is happening.

this is my config:

.env : `# Payment Stripe

STRIPE_API_KEY=sk_test_xxxxxxxxxxxxxxxxx` image image

.env : NEXT_PUBLIC_STRIPE_KEY=pk_test_xxxxxxxxxxxxxx

VariableVic commented 1 month ago

Nice catch @rida-rechrache - I just pushed a fix. Should work now! Can you please confirm if this solves your issue?

rida-rechrache commented 1 month ago

Hi @VariableVic, thank you for your reactivity. However, it is not working when I choose to pay with card; the button stays disabled

image

VariableVic commented 1 month ago

What is the provider_id for the card payment provider?

rida-rechrache commented 1 month ago

@VariableVic I added this code in ....\checkout\components\payment\index.tsx =====selectedPaymentMethod : {selectedPaymentMethod} {" "} =====stripeReady : {stripeReady} Here is the screenshot that shows the information, but i don't understand why stripeReady is false

image

image