小编Mue*_*Sam的帖子

如何在 Ionic 4 中集成 Stripe 支付

我是离子框架的新手,并试图在我的应用程序中集成条纹。我做了一些研究,发现只有这个https://ionicframework.com/docs/native/stripe。它解释得不够好。我如何在 .html 文件上实现这个概念,比如为用户提供一个按钮来触发付款?

我也试过这个https://fireship.io/lessons/stripe-elements-angular/但一路上迷路了。

checkout.page.ts

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)

stripe-payments ionic4 angular7

8
推荐指数
0
解决办法
3156
查看次数

标签 统计

angular7 ×1

ionic4 ×1

stripe-payments ×1