NativeScript Stripe-SDK
This repo is based on @Osei Fortune's nativescript-stripe. Perfect job, Sir!
IMPORTANT: Highly recomend using @Osei Fortune's nativescript-stripe
The purpose of this plugin is to add some specific functionalities required by the app I work on. I have also wanted to use official nativescript-plugin-seed
Implemented for iOS only - this plugin uses 11.3 Stripe's SDK.

Installation
tns plugin add nativescript-stripe-sdk
Usage in Android
Set API key
Add this to the main *.module.ts file (app.module.ts)
;; const stripeSdk = ; application;
Usage in UI
Example paymentCardTextFieldDidChange handler
; ... { const isValid = StripeSdk; if isValid StripeSdk ; }
Usage in vanilla NS
IMPORTANT: SDK API key needs to be set on app startup
; application;
Usage in UI
Check if given CC is valid (card of STPCardParams type)
; const isValid = StripeSdk;
Generate stripe token
IMPORTANT: valid stripe API key needs to be set on app startup
; StripeSdk ;
API
In XML:
Property | Default | Description |
---|---|---|
expDate | not set | CC expiration date - typeof Date |
number | not set | CC number - typeof string |
cvc | not set | CC expiration date - typeof string |
Running the demo app
git clone git@github.com:piotrilski/nativescript-stripe-sdk.git
cd src/
npm run setup
npm run demo.ios
Running angular demo
git clone git@github.com:piotrilski/nativescript-stripe-sdk.git
cd src/
npm run setup
npm run demo.angular.ios
License
Apache License Version 2.0, January 2004