#eladrenalina
1 messages · Page 1 of 1 (latest)
So do you only get this error on the front-end?
That looks like an error in the browser console
Or are you seeing this server side as well with those api calls?
Ok took another look. Looks like the error is on calling your /add endpoint and the code on the backend is creating that error
Can you log config.STRIPE.PRIVATE_KEY in your code prior to creating the payment intent? Don't paste the value in here as that's sensitive. Just want to see if you're receiving the environment variable properly
I really couldn't confirm this.
It is true that the error is shown to me on the front side, but since the application is deployed in AWS, I am not logging the payment process, so I cannot see if it returns an error on the back while it is deployed in aws.
In local mode I do NOT have that problem. In local mode it works correctly and processes the payment in stripe test mode.
The problem arose when I deployed my application in AWS, I tried to make a payment, I got that error.
There is not much information about this error on the web.
OK wait a moment.
Yes, the info is send in the log. that work. so
Given that it works on your local environment is important to note here but I see you might be adding more context
i understand the intent payment is not a problem. maybe is same config
I think I tried to give all the information I have.
The reality is that I followed the steps in the Stripe documentation, and locally if I start Node and React, then I try to make a payment, Stripe returns a correct value and the payment is saved in my database and processed by stripe without problems .
So why does it work locally, and when it's mounted in the aws container it doesn't work? Could it be that AWS needs some configuration for the STRIPE response?
Yeah, that is weird. I see that when you log the key, you do get what you expect.
I'm getting help
👋 Hopping in here to help - give me a minute to catch up
Just to confirm - when you logged your secret key and got back ("sk_xxx") was that in your local test that was already working, or in the one that was deployed to AWS?
Also, what happens when you replace config.STRIPE.PRIVATE_KEY and hardcode your secret key directly?