#shainanand

1 messages · Page 1 of 1 (latest)

viral wigeonBOT
#

Hello! 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.

uneven spruce
#

Uncaught ReferenceError: require is not defined

window._ = require("lodash");

vale pilot
#

Can you share a documentation link for the feature you're implementing?

vale pilot
#

Ok, and what does your code look like?

uneven spruce
#

import {loadConnectAndInitialize} from '@stripe/connect-js';

const stripeConnectInstance = loadConnectAndInitialize({
// This is your test publishable API key.
publishableKey: "myPublishableKey",
fetchClientSecret: 'mySecret',
});

const accountOnboarding = stripeConnectInstance.create('account-onboarding');
accountOnboarding.setOnExit(() => {
console.log('User exited the onboarding flow');
});
container.appendChild(accountOnboarding);

vale pilot
#

Sounds like you're potentially mixing server/client code

uneven spruce
#

in the documentation, it is suggesting to use server side code. But i tested it without server side function

vale pilot
uneven spruce
#

yes, i have generated account session using the php code

#

then I used the generated clientSecret in the above js code

#

so i harcoded the values

vale pilot
uneven spruce
vale pilot
#

Can you share your HTML code?

#

Specifically how you import the JS

uneven spruce
#

<script type="module" src="{{ asset('js/index.js') }}" defer></script>

#

index.js has the above js code

#

okay, i think i found the issue. Seems like some of my other libraries are causing this

#

Apologies for the inconvenience 🙏