#masini_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1290602063021080629
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
To provide better context, createPaymentIntent function in this case is a custom hook that I created and is used in the frontend, which sends a request to my Next API that creates a Payment Intent on the server side, and returns the response of the Payment Intent on success.
But what's mostly important in this case is that I am using the Elements provider for react-stripe-js
Actually, you can't test Google/Apple Pay buttons in your localhost, you need to have HTTPS server and registred your domain. Other payment methods however can be tested in your localhost (.e.g card, sepa, ach...)
Are there any other providers apart from Google/Apple Pay that can be tested in localhost such as Amazon Pay or Link? Because like I said when I render the component it's just blank, and I'm not sure if I'm doing something wrong or it's just the fact that I'm running the app locally.
You'll need a https server for that yes... you can use a https tunnel (for example ngrok) in order to test this quickly..
Oh yeah I forgot I could do that, will test it out soon. Thanks!
Happy to help!
Google Pay worked now, but when I try to make a payment with a Stripe Test Card it just says
Your request failed. Use a different payment method, or contact us. Learn more [OR-CCSEH-21]
The card I used is
NO: 4242 4242 4242 4242
EXP: 09/28 CVC: 123
And I'm obviously testing in a test environment.
The Google Pay window even has this message on it:
Your payment method won't be charged because you're in a test environment
Is this a known issue for test card payments to not work on Google Pay? Or do I need to use a card that exists for this?
Just asking out of curiosity as the request error has to deal with incorrect card details.
For testing Google Pay you need to use live/real cards