#mdubya_

1 messages · Page 1 of 1 (latest)

wicked vaporBOT
#

Hello mdubya_, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• mdubya-setupintent-status, 1 day ago, 26 messages

tawny zealot
#

Hello! How can I help?

frosty temple
#

using stripe.js/element. largest copy/pasted from examples.

const {error} = await stripe.confirmSetup({
                        elements,
                        confirmParams: {
                            return_url: return_url,
                        }
                    });
#

after the payment info is posted to stripe.

#

i still need the post data from my form

#

but its just a redirect

#

ive got the stripe payment element in the same form with unrelated user data that i need posted.

#

is there a place i can insert some of my own logic while i still have that data?

if (error) {
                        $(".overlay").addClass('d-none').parent().removeAttr('disabled')
                        
                        const messageContainer = document.querySelector('#error-message');
                        messageContainer.classList.remove('d-none')
                        messageContainer.textContent = error.message;
                    } else {
                        event.preventDefault();
                        alert('sup')
                        console.log('sdfasdfasdf')
                        window.open('https://www.google.com', '_blank');
                    }```
#

kind of messing around with the else part of the statement.

else {
                        event.preventDefault();
                        alert('sup')
                        console.log('sdfasdfasdf')
                        window.open('https://www.google.com', '_blank');
                    }```
#

i thought that might work there but it did not

tawny zealot
#

Is your goal to stop doing the redirect entirely? Am I understanding right that you're tyring to put in your own logic after the payment is complete but before the redirect?

frosty temple
#

well. i need the setupintent confirmation

#

i dont necessarily need to stop the redirect entirely

#

but i do need the post data from my form

#

AFTER i get the setup_confirm

#

i suppose i could store all the data i need in meta_data w/ stripe and get it when i retrieve the setupIntent

#

not ideal imo

tawny zealot
#

Only other thing I could think of would be to put that data into a local storange or a session and have it persist even after the redirect

frosty temple
#

ok. had considered something similar as well but hoped i could maintain the request data.

#

alright. ill tinker.

#

thx

#

actually. before i lose you.

#

can i actually submit metadata with the original 'element' ?

#

not seeing metadata as an optional param there

tawny zealot
#

If you're asking if you can include metadata in a confirmation request the answer is no 😦