I am struggling with getting the new Stripe elements to work. I am using Stripe Payment and the form is showing up (although no tabs are showing up with payment methods which is a seperate issue). I am trying to bind the client_secret for the server connect payment intent action to the Stripe elements, but its showing as undefined in my server logs. My form is:
Bind the value returned by the server action to the client secret dynamic attribute of the stripe element.
Also you don't need any form to wrap the stripe elements and payment. Here's my test page code:
Thanks I tried that before but it kept going through to stripe as “incomplete payment” because there was no payment method attached. My setup has automatic payment setup and in stripe dashboard as well. Also for some reason the payment tabs are not showing up at the top of the form it only has the word “card” in text
However when I set it to Without Intent then the payment form loads.
Also I noticed in your button you hacve a confirmpayment action. I dont have that. All I have is 1 server action which contains the payment intent template
Remove the mode="payment" and currency="aud" from your code.
Can you just copy my code, paste it as it is on your page and change the keys/server actions/redirect urls to use your own values then test again.
Of course you need this to start the payment flow.
Also if anything does not appear as it should on your page just check dev tools/console of your browser the errors can be seen there, that's why i asked you to check there.
Please open the Console of dev tools (not Network > XHR) and refresh your page. Don't hit the button to run the payment flow. Just see what errors are show in in the console on page load!
So there are no Stripe related errors?
Is the payment intent server action actually running on your page? Can you check if you haven't set it to no auto load?
I just noticed that error of not a valid url - so I just added https://google.com in the payment intent sevre action.. and now the error is: },
"error": "You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method or ConfirmationToken."
}
Just added your button and form is still not showing up:
"chargeKyc": "no"
},
"error": "You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method or ConfirmationToken."
Can you please create a new server action for the payment intent which only contains the payment intent template and test with it.
The only options to test with are these: