#Sophia123
1 messages · Page 1 of 1 (latest)
what is getStripeCreateOptions and where is that defined?
const element = document.getElementById('stripe-elements-create-options');
if (element) {
const elementText = element.innerText.trim();
if (!!elementText && elementText.length > 0) {
try {
return JSON.parse(elementText);
} catch (e) {
console.error(e, elementText);
}
}
}
return {};
}
<!-- https://stripe.com/docs/elements/appearance-api -->
<div id="stripe-elements-appearance" class="stripe-elements-appearance">
{
"theme": "stripe",
"variables": {
"fontFamily": "'Helvetica Neue', Arial, sans-serif",
"borderRadius": "2px",
"fontSizeBase": "0.9rem"
}
}
</div>
<!-- https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options -->
<div id="stripe-elements-create-options" class="stripe-elements-create-options">
</div>```
defaultValues: {
billingDetails: {
name: fullName ? fullName: userModel.displayName,
email: userModel.email
}
},
fields: {
billingDetails: {
},
},
wallets: {
applePay: 'never',
googlePay: googlePayEnabled ? 'auto' : 'never',
}
};```
what is the point of that code that tried to read the innerText?
oh you like put the configuration into a div and read it from there. That is .. unusual, why not just have the data in the JS
in any case, I suggest doing a full text search for savePaymentMethod in your project and see where it's being set
to be clear, savePaymentMethod is a parameter that the PaymentElement excepts but only when your account is part of a certain beta. Not sure if that rings any bells for you.
I fall into Stripe update method. As you can see I pass no savePaymentMethod param. But if I go deeper at call stack, I see that savePaymentMethod was added
interesting
if you have a public site we can visit to look into this it might help, it's a bit abstract/hard to dig into right now
https://71ca-188-240-57-86.ngrok-free.app/checkout/test.jsp
You can type any email/password . No hard to register
integration page
thanks, can you write to https://support.stripe.com/?contact=true with all the details so we can dig in in more detail?
I looked at that link but there's nothing on it but lorem ipsum so please do make sure you explain how to get to the part of the page that actually uses Stripe
Unfortunately I can't provide a URL for testing right now. I think I'll come back with a question later if I can't get rid of the error