#Pete100

1 messages · Page 1 of 1 (latest)

vivid flameBOT
thick root
#

Hi there, is there a URL that I can visit to reproduce the problem?

keen crystal
#

see PM

thick root
#

Yup, and I asked a question

thick root
#

Hi @keen crystal I don't see the response contains paymentSetupClietnSecret, but has paymentsetupSecret

keen crystal
#

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} />
...
);
}
thick root
#

so you extract paymentsetupSecret the response and set it as paymentSetupClietnSecret ?

keen crystal
#

yup. I just updated my response above with code

#

it is a bit of a weird issue!!!

thick root
#

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
...
keen crystal
#

touche. let me try

#

It will take a while for the changes to deploy