Stripe not working in my Saas Template Project.
I have added a test product in stripe and added the appropriate keys in the .env.server file but it is not working and the error is not giving much information.
17 Replies
Please check the error in your terminal
The backend should be running on port 3001 right?
yes
try restarting the wasp dev server as I mentioned in the other question and provide some details as to what errors youre seeing in your terminal
@Manan
Restarted the project multiple times.
ok well its obviously an issue with your stripe payment operation. try adding some console.log statements and debugging to figure out where the error is happening
1. make sure you've got the test api key and price id (not product id) from your stripe dashboard. follow the instructions in the hackathon rules page or in the stripe docs
Already done and verified.
2. make sure you have a logged in user ( try console.log(context.user) in your stripe payment operation)
3. add other console.logs to see where the error could be happening
I think this is the problem. I am using google auth but not storing the data.
Can you point me to a doc or something for that?
Wohooo @Manan, you just became a Waspeteer level 3!
i don't know what this means
use the Postgres database by following the instructions in the template
install docker desktop
run
wasp db start
in a seperate terminal windowAfter google login, we have to store the user details to the database right?
actually your server is showing you that this is the problem, because
stripePayment
is giving you a 401 error
and in the stripePayment operation we have this:
Yes. I understood the problem. Let me dig through the docs. Thanks.
cool!
I'll DM you the client link, can you take a quick look into that? How's the project for the saas-a-thon.
Automatic tax was not setup in stripe. And it's not available for my country right now. I removed this line (48) from src>server>actions.ts and it worked finally.