#Pete100
1 messages · Page 1 of 1 (latest)
Hi there, is there a URL that I can visit to reproduce the problem?
see PM
Yup, and I asked a question
Hi @keen crystal I don't see the response contains paymentSetupClietnSecret, but has paymentsetupSecret
The response gets passed as paymentSetupClietnSecret.
on parent Page:
handleSubmit() {
...
if (response.data.paymentsetupSecret) {
this.setState({
paymentCollectionClientSecret: response.data.paymentsetupSecret,
paymentCollectionModal: true
});
}
...
}
render() {
const { someStuff, paymentCollectionClientSecret } = this.state;
return(
...
<PaymentConfig open={paymentCollectionModal} paymentSetupClietnSecret={paymentCollectionClientSecret} />
...
);
}
so you extract paymentsetupSecret the response and set it as paymentSetupClietnSecret ?
yup. I just updated my response above with code
In the image, you can see the react javascript compilation with the value of paymentSetupClietnSecret set correctly
https://media.discordapp.net/attachments/841573134531821616/1064799358559731732/image.png
it is a bit of a weird issue!!!
OK. I'd suggest you to add some code so that Elements is only rendered when the client_secret is available. For example:
return (
paymentSetupClietnSecret && (
<Elements
...