#Max4637 - Payments in Angular

1 messages · Page 1 of 1 (latest)

glass void
#

Hi Max. What is the exact warning message you are seeing?

limpid badger
#

The bottom is cart.component.ts

#

Sorry HTML

#

it’s connected to TypeScript

glass void
#

Gotcha so the issue is you are using the legacy version of checkout

limpid badger
#

Yes

#

I don’t know how to convert in Angular

glass void
#

What language are you using on the back-end for creating checkout sessions?

#

Sorry let me rephrase

#

What language is your back-end in? The new, recommended way of using Stripe Checkout is to create a checkout session server-side and redirect the customer to the link generated by that Checkout session

limpid badger
#

Node.JS

#

I have a server.JS class in the /src

glass void
#

Cool. So, you can follow the guide I linked and select "Node" in each of the code snippets

limpid badger
#

Do you know of any example videos? I am not understanding if the checkoutButton is part of the server.JS class

glass void
#

Let me see if I can find something else for you. Checkout button would be on the front-end. You can customize that a bit more too since you're using Angular

limpid badger
#

Is the PK supposed to be in server.JS in the recent version?

glass void
#

You referring to your Stripe private API key?

#

That would be loaded in your server-side integration, but you shouldn't store that in the code. That should be stored more securely (ex: as an environment variable)

limpid badger
#

Yes

#

I will create an env file too

glass void
#

Main reason is you don't want to compromise it by checking the code into github, etc.

limpid badger
#

It could give away secret info I believe

glass void
limpid badger
glass void
#

Yes. It's the current, recommended way

#

This will give you all the options/parameters you can pass in

limpid badger
#

Thank you

glass void
#

No problem!