我是离子框架的新手,并试图在我的应用程序中集成条纹。我做了一些研究,发现只有这个https://ionicframework.com/docs/native/stripe。它解释得不够好。我如何在 .html 文件上实现这个概念,比如为用户提供一个按钮来触发付款?
我也试过这个https://fireship.io/lessons/stripe-elements-angular/但一路上迷路了。
import { Component, OnInit, Input, HostListener } from '@angular/core';
// import { Stripe } from '@ionic-native/stripe/ngx';
import { AuthService } from '../services/auth.service';
import { FirebaseService } from '../services/firebase.service';
import { AngularFireFunctions } from '@angular/fire/functions';
import { Router } from '@angular/router';
import { Observable, of } from 'rxjs';
declare var Stripe;
@Component({
selector: 'app-rentals',
templateUrl: './rentals.page.html',
styleUrls: ['./rentals.page.scss'],
})
export class RentalsPage implements OnInit {
user$: Observable<User>;
constructor(
private router: Router,
// …Run Code Online (Sandbox Code Playgroud)