stripe angular 10 code example
Example 1: stripe angular
import { NgModule } from "@angular/core";
import { StripeModule } from "stripe-angular"
@NgModule({
imports: [ StripeModule.forRoot("...YOUR-STRIPE-KEY-HERE...") ]
}) export class AppModule {}
Example 2: stripe angular
<stripe-card #stripeCard
(catch) = "$event"
[(token)] = "token"
[(invalid)] = "invalidError"
(cardMounted) = "cardReady = 1"
></stripe-card>
<button type="button" (click)="stripeCard.createToken(extraData)">createToken</button>