项目作者: capacitor-community

项目描述 :
Stripe Mobile SDK wrapper for Capacitor
高级语言: Java
项目地址: git://github.com/capacitor-community/stripe.git
创建时间: 2019-11-02T16:04:26Z
项目社区:https://github.com/capacitor-community/stripe

开源协议:MIT License

下载



Stripe


Capacitor community plugin for native Stripe.




packages

package name description path
@capacitor-community/stripe Support for non-personal payments using Stripe /packages/payment
@capacitor-community/stripe-identity Supports identity verification using Stripe /packages/identity
@capacitor-community/stripe-terminal Support for in-person payments using Stripe /packages/terminal

Hint

Using v7, we recommend to remove buildscript from app/build.gradle

Good news for users who added a buildscript in v6 to eliminate the Unable to get provider androidx.startup.InitializationProvider error, it is no longer needed in Capacitor v7. Please remove the following

  1. - buildscript {
  2. - ext.kotlin_version = '2.0.+'
  3. - repositories {
  4. - google()
  5. - mavenCentral()
  6. - }
  7. - dependencies {
  8. - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  9. - }
  10. - }
  11. - apply plugin: 'kotlin-android'

Versions

Users of Capacitor v6 should use version v6 of the Plugin.

  1. % npm install @capacitor-community/stripe@6
  2. % npm install @capacitor-community/stripe-identity@6
  3. % npm install @capacitor-community/stripe-terminal@6

How to use Stripe Android currently package

Capacitor Android 7’s default settings is here:

  1. minSdkVersion = 22
  2. compileSdkVersion = 35
  3. targetSdkVersion = 35

To use the latest Stripe Android, you need to version these up. To use the latest features, follow these steps.

  1. Open android/variables.gradle and change sdkVersion version, if need.
  2. Add stripeAndroidVersion, identityVersion or stripeterminalCoreVersion and set required version. Release information is here:
  1. ext {
  2. - minSdkVersion = 23
  3. + minSdkVersion = 26
  4. compileSdkVersion = 35
  5. targetSdkVersion = 35
  6. androidxActivityVersion = '1.9.2'
  7. androidxAppCompatVersion = '1.7.0'
  8. androidxCoordinatorLayoutVersion = '1.2.0'
  9. androidxCoreVersion = '1.15.0'
  10. androidxFragmentVersion = '1.8.4'
  11. coreSplashScreenVersion = '1.0.1'
  12. androidxWebkitVersion = '1.12.1'
  13. junitVersion = '4.13.2'
  14. androidxJunitVersion = '1.2.1'
  15. androidxEspressoCoreVersion = '3.6.1'
  16. cordovaAndroidVersion = '10.1.1'
  17. // If you use @capacitor-community/stripe:
  18. + stripeAndroidVersion = '21.3.+'
  19. // If you use @capacitor-community/stripe-identity:
  20. + identityVersion = '21.3.+'
  21. // If you use @capacitor-community/stripe-terminal:
  22. + stripeterminalCoreVersion = '4.1.0'
  23. + stripeterminalTapToPayVersion = '4.1.0'
  24. }

Note: @capacitor-community/stripe-terminal does not work with the default sdkVersion, so these updates are mandatory. See /packages/terminal for more information.

Error when running cap update ios

  1. [!] CocoaPods could not find compatible versions for pod "StripePaymentSheet":
  2. In snapshot (Podfile.lock):
  3. ..
  4. You have either:
  5. * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
  6. * changed the constraints of dependency `StripePaymentSheet` inside your development pod `CapacitorCommunityStripe`.
  7. You should run `pod update StripePaymentSheet` to apply changes you've made.

You will see this error often when using Capacitor iOS. The solution is simple: do the following:

  1. % cd ios/App && pod install --repo-update

or

  1. % cd ios/App && pod update

Maintainers

Maintainer GitHub Social
Hidetaka Okamoto hideokamoto @hide__dev
Masahiko Sakakibara rdlabo @rdlabo

Contributors ✨



Made with contributors-img.

Demo

Screenshots

@capacitor-community/stripe

Android iOS Web
PaymentSheet
PaymentFlow
ApplePay Not supported beta.
GooglePay Not supported

@capacitor-community/stripe-identity

Android iOS Web
Identity

How to use Demo

  1. % git clone git@github.com:capacitor-community/stripe.git
  2. % cd stripe && npm install && npm run build
  3. % cd demo && npm install && npm run cap && npx cap update