#mkoenke
1 messages ยท Page 1 of 1 (latest)
Hi ๐
hello!
What have you tried?
trying to swap out the CardElement for the PaymentElement. The way we currently render the card element is that we have <StripeProvider apiKey:'pk_12345' /> that is wrapping the elements instance (from 'react-stripe-elements') that is wrapping the payment form (that is rendered using injectStripe). The payment form renders the card element.
I tried passing the client_secret from creating the payment intent to the elements instance and swapping out the card element for the payment element, but its not working... and I noticed the docs for Payment Element Migration are not using react-stripe-elements so not sure if its compatible
Okay can you share a little bit of what you are trying to do in the code here?
react-stripe-elements has. been archived and deprecated since March, 2021
So we don't maintain current examples using that library
Okay and in this case the Payment Element doesn't render?
correct
@pine geode
Hello! I'm taking over and catching up...
As far as I know react-stripe-elements does not support the Payment Element. Would it be possible for you to switch to react-stripe-js instead? https://github.com/stripe/react-stripe-js
I think so! I'll try to switch it over and see if that works
Sounds good!
doesnt seem like a huge lift to transition to react stripe js
Oh, we do have a migration guide here too, which I should have linked to earlier! https://github.com/stripe/react-stripe-js/blob/master/docs/migrating.md
thanks so much, i'll check it out