dylan-p-wong / stripe-discord-renewals-dashboard

Helpful template for discord server owners to monetize their server using Stripe renewals.
9 stars 4 forks source link

redirect path & types.js #6

Open Lmaooo99 opened 3 years ago

Lmaooo99 commented 3 years ago

I set the redirect path as localhost:3000/dashboard with discord auth0 redirect, but localhost:3000/dashboard returns nothing as homepage shows. Do I need to edit variables in types.js and how?

Thx for replying

dylan-p-wong commented 3 years ago

I have updated the readme. The default is http://localhost:1812/auth/login/callback for what to add as the redirect URL for testing.

Lmaooo99 commented 3 years ago

Got it, it works. Thx. But how to edit the client/src/actions/types.js. After I submit the payment, It keeps processing and shows Cannot read property 'status' of null in cmd. Is this related to types.js or not?

Sorry to bother again

dylan-p-wong commented 3 years ago

I pushed a fix for the config I noticed. I don't know if this will fix it for you. Could you please send a photo or exact error message.

Lmaooo99 commented 3 years ago

Still got stuck on processing the payment with the new fix. Here is the backend logs

Lmaooo99 commented 3 years ago

And here is the frontend logs Thx for your help!

dylan-p-wong commented 3 years ago

Did you change the .sample.env to .env? I think I'll try and add better error handling soon.

Lmaooo99 commented 3 years ago

I did, just not work. Sorry for wasting your time Appreciate it!!!

dylan-p-wong commented 3 years ago

Sorry I have had exams. If you want to try and debug you can console log the payment const payment = await stripe.paymentMethods.retrieve(customer.invoice_settings.default_payment_method); in the stripeRoutes.js. I believe the error is coming from there. When I am not as busy I am planning to add some better error catching.