basir / next-pg-shadcn-ecommerce

https://next-pg-shadcn-ecommerce.vercel.app
27 stars 7 forks source link

Issue with Stripe Payment #7

Closed LenNaidoo closed 1 week ago

LenNaidoo commented 1 week ago

When I click on place order:

  1. The Order Summary does not show Stripe's 'Payment Element'
  2. The Order is immediately submitted to Stripe.
  3. The payment is received by Stripe. It's status is incomplete - message: The customer has not entered their payment method.
  4. Terminal - POST /place-order 303
basir commented 1 week ago

I can't reproduce this error in this repo. share your repo to take a look. also in which lesson do you get this error?

LenNaidoo commented 1 week ago

I shared the repo with you. I got the error in lesson 32, Pay order by Stripe. Thanks

basir commented 1 week ago

I got 404 error when I want to accept invitation in your GitHub repo. Remove me from collaborators and add again.

On Fri, Jun 28, 2024 at 3:23 PM Len Naidoo @.***> wrote:

I shared the repo with you. I got the error in lesson 32, Pay order by Stripe. Thanks

— Reply to this email directly, view it on GitHub https://github.com/basir/next-pg-shadcn-ecommerce/issues/7#issuecomment-2196738112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATUFQZLA5GO5OBTUJSEEHDZJVFFLAVCNFSM6AAAAABJ7YUI6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJWG4ZTQMJRGI . You are receiving this because you commented.Message ID: @.***>

LenNaidoo commented 1 week ago

I re-added you as a collaborator

basir commented 1 week ago

I cloned and ran your code in my side and it works perfectly. the issue is stripe config. make sure you set env variables correctly in .env.local and vercel dashboard like this: NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pktest???? STRIPE_SECRET_KEY=sktest??? STRIPE_WEBHOOKSECRET=whsec???

LenNaidoo commented 1 week ago

That was it, my STRIPE_PUBLISHABLE-KEY was incorrect. I was using pklive???. Thank you.

basir commented 1 week ago

you're welcome. glad you fixed it.