#redquicksilver
1 messages · Page 1 of 1 (latest)
👋 Hi there, Happy to help!
I invite you to take a look at this guide:
https://stripe.com/docs/payments/quickstart?lang=dotnet&client=html&platform=web
You can even download a complete working sample project from there
Ok, thank you - that is the sample project I have been using as a reference
I have copied the js file into a file in our solution, and have done an npm install of the stripe/strips-js library
I was getting compilation errors when someone told me to add 'import Stripe from stripe' at the top of the js file
which I have done. Now I have no errors, but when I run it, it no longer works
I get these 2 errors:
My code looks like this which I have pretty much copied from your website:
Not seeing exports in your screenshot, is this how looks your stripe-payment.js ?
Yes, that is correct - it is my stripe-payment.js file, and there isn't an exports
When you click on the lick, it refers to what line in your script ?
When I click on the first error it goes to the generated javascript file, (from the Typescript one) highlighting this line:
and the 2nd error takes me to this line:
Here it doesn't look like your initial js file, are you using a framework ?
We are not using a framework, but it is Typescript
The first screenshot is of stripe-payment.JS which has been created by Typescript
The 2nd screenshot is of stripe-payment.TS which is the Typescript file
How are you doing the conversion from the Typescript to Javascript ? what compiler are you using?
We use Visual Studio 2022
It looks like there is an issue while doing the translating, Like line 2 in the JS result file
Did you followed this guide:, in order to configure your typescript compiler ?
https://code.visualstudio.com/docs/languages/typescript
Thank you os4m37 - I will go through that page and let you know how it goes