#kaustuva-le-react
1 messages · Page 1 of 1 (latest)
yeah, this can be really tricky or sometimes impossible. I'd need to see your full code
On index:
`this.setState({
stripePlatform: await loadStripe(data.stripe_publishable_key),
stripe: await loadStripe(data.stripe_publishable_key, {
stripeAccount: data.stripe_account,
})
})
<Elements stripe={stripe}>
<StripeWidgets
...,
stripePlatform={stripePlatform}
/>
</Elements>`
On StripeWidgets:
`stripe=useStripe()
elements=useElements()
const {error, paymentMethod} = await props.stripePlatform.createPaymentMethod({
type: 'card',
card: elements.getElement(CardElement),
billing_details: {
name: props.customer_name || nameOnCard,
},
})`
The same code was working fine earlier with two objects
versions used:
"@stripe/react-stripe-js": "1.7.0",
"@stripe/stripe-js": "1.23.0",
can you write to https://support.stripe.com/?contact=true and we will dig in? This can be pretty complicated.
it's a lot easier to work on this over an email