#enzo-vmachia_code

1 messages ยท Page 1 of 1 (latest)

nova hullBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1339646262726754308

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

normal yarrow
#

ola

fading patrol
#

Hi ๐Ÿ‘‹

What are you trying to do? The error is pretty clear, this isn't a function in Stripe PHP

normal yarrow
#

sim, estou tentando iniciar a verificao de uma conta conectada, estou utilizando o php para realizar as verificacoes no meu banco de dados se ja armazenei o id da conta e so assim dar prosseguimento a cricao da conta ou entao verificacao se necessaria

#

esse e o codigo

nova hullBOT
#

๐Ÿ—ฃ๏ธ Sorry, English only

We can only provide help in English on Discord, but you can contact Stripe support for help in other languages. ๐ŸŒ Translate this message

normal yarrow
#

yes, I'm trying to start verifying a connected account, I'm using PHP to perform checks on my database to see if I've already stored the account ID and then proceed with creating the account or verifying if necessary

normal yarrow
# normal yarrow

<?php endif; ?>
</div>

<script src="https://js.stripe.com/v3/"></script>
<script>
    function startStripeVerification() {
        fetch('account_session.php', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
            },
            body: JSON.stringify({ account: '<?php echo $stripe_account_id; ?>' }),
        })
        .then(response => response.json())
        .then(data => {
            if (data.client_secret) {
        const stripe = Stripe('pk_test_51QrP3URs7hIyKckB9RNPsUmIQzGK1Zut6nAAurqYyQbLBRt176oUKSy0cI1ptNbYfhybDAPBzzmTZHmTDjRjFhh800XMlvm9jg');
                stripe.redirectToAccountOnboarding(data.client_secret).then(result => {
                    if (result.error) {
                        alert('Erro ao iniciar onboarding: ' + result.error.message);
                    }
                });
            } else {
                alert('Erro ao obter client_secret');
            }
        })
        .catch(error => {
            console.error('Erro:', error);
        });
    }
</script>

</body>
</html>

normal yarrow
#

Can I only do this in a separate js file?

fading patrol
#

Sorry but that still isn't clear to me. What is the specific JS function you are attempting to call? What do you mean by "verifying" the account?

normal yarrow
#

stripe.redirectToAccountOnboarding ,What I mean is that it is in a php file because I start by making requests to the database to check the existence of the account, when I create an account on stripe I store the id of that account in my database, however when I am calling redirectToAccountOnboarding to start configuring the account it returns the error stripe.redirectToAccountOnboarding is not a function I would like to know if I am doing something wrong if so how should it be done

fading patrol
#

What doc are you following? Where do you expect this function to exist?