网易云

Ionic实战视频教程(跨平台): https://www.itying.com/goods-1067.html

Flutter实战视频教程(跨平台): https://www.itying.com/goods-1176.html

Stripe

Contents

A plugin that allows you to use Stripe's Native SDKs for Android and iOS.

https://github.com/zyramedia/cordova-plugin-stripe

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Ionic Stripe插件的安装(Installation)

ionic cordova plugin add cordova-plugin-stripe npm install @ionic-native/stripe
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/stripe

Ionic Stripe插件支持的平台(Supported Platforms)

  • Android
  • Browser
  • iOS

Ionic Stripe插件的用法(Usage)

import { Stripe } from '@ionic-native/stripe/ngx';

constructor(private stripe: Stripe) { }

...

this.stripe.setPublishableKey('my_publishable_key');

let card = {
 number: '4242424242424242',
 expMonth: 12,
 expYear: 2020,
 cvc: '220'
}

this.stripe.createCardToken(card)
   .then(token => console.log(token.id))
   .catch(error => console.error(error));