#Ian-Payment-Elements
1 messages · Page 1 of 1 (latest)
Hi there
That's very strange
Do you have this live anywhere that I could test it?
Or are you testing locally?
im testing locally
but also exists on hybridstrengthcoach.com
i tried it there first
and discovered the issue
Can you walk me through how to reproduce it on hybridstrengthcoach.com?
i had a colleuge walk through it and he couldnt reproduce it
but you can
- select an option and click the free trial checkbox. add to cart.
- click the checkout button
- on the cart/confirm page enter payment info and agree to the terms
the issue occurs when i submit the checkout form
does that help?
ive had a couple of people do it successfully so it might be an issue specific to me
You've had a couple people reproduce it? Or you were the only one to reproduce?
Do you have preventDefault in your code?
Can you show me your submit handler?
im the only one who can produce it
yes i preventDefault
async handleSubmit(e, intentType) {
e.preventDefault();
this.trigger('payment-element-submitting', true);
const { elements } = this.state;
if (!this.props || !elements) {
throw Error('submit error');
}
let returnUrl: string | undefined;
let error: StripeError | { message: string;} | undefined;
switch (intentType) {
case 'paymentIntent':
returnUrl = `${window.location.origin}/cart/success/${this.props.stripeCustomerId}/${this.props.invoiceId}`;
({ error } = await this.handlePayment(elements, this.props, returnUrl));
break;
case 'setupIntent':
returnUrl = `${window.location.origin}/trial/success/${this.props.stripeCustomerId}`;
({ error } = await this.handleSetup(elements, this.props, returnUrl));
break;
default:
// sets custom error message if something unexpected goes wrong
error = { message: 'Unable to process client secret' };
}
not sure how helpful it is but i call the stripe client methods inside the case statement
Can you share your handleSetup code?
handleSetup(elements: StripeElements, props: PaymentElementProps, url: string) {
if (this.state.selectedPaymentMethod) {
// confirmCardSetup will not redirect by default so it will return a result with no error
return this.state.stripeClient.confirmCardSetup(props.clientSecret, {
payment_method: this.state.selectedPaymentMethod,
return_url: url,
});
}
return this.state.stripeClient.confirmSetup({
elements,
confirmParams: {
return_url: url,
},
});
},
the most common code path is outside of the if statement. that is what is causing issues for me
i dont know much about firefoxes partitioned storage api but i get those warnings in the console with the stripe libarary
thats a difference i notice between firefox and other browsers
Do you have a test email/pw I can use on your site?
Hmm okay I was able to reproduce what you stated
Interesting.
Alright give me a few mins to take a look at this with a teammate
its interesting that no errors are returned
What version of Firefox are you on?
103.0.2
my collegue is using an old version. 87
they could not reproduce on 87
@unique moat so far we are stumped here. Clearly for some reason Firefox is performing navigation upon confirmSetup but we can't quite figure out why. This is going to take some further debugging on our end... can you shoot an email to our Support team via https://support.stripe.com/contact/login and mention my handle (bismarck) in the email and let me know when you have sent it? Then I can grab the ticket and follow up with you over email later today.