Socket
Socket
Sign inDemoInstall

ng-stripe

Package Overview
Dependencies
6
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng-stripe

ng-stripe is a simple stripe payment gateway api.


Version published
Weekly downloads
3
Maintainers
1
Install size
288 kB
Created
Weekly downloads
 

Readme

Source

NgStripe

This library was generated with Angular CLI version 8.2.4. This is a simple stripe payment gateway libray. We have not used styles, you can change the card layout as your own. Demo

Features!

  • Easy to use
  • Card validation
  • less code to get response json

Installation

$ npm i ng-stripe 

Import NgStripeModule in your module.ts file ( app.module.ts file )

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

import { NgStripeModule } from 'ng-stripe';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgStripeModule
  ],
  providers: [
	  
	],
  bootstrap: [AppComponent]
})
export class AppModule { } 

Configuration

Add below code in your .html file

<lib-ng-stripe apiKey="pk_test_Pj5AIAyJnj8lafRKnF1gC5wY" apiSecret="sk_test_hj06rZIyHdrs9etIqk7pSVax" totalAmount="10" currency="USD" stripeBtnText="pay" stripeBtnLoading="Loading.." orderId="25"  email="user@example.com"  (apiResponse)="paymentChange($event)"></lib-ng-stripe>

Add below code in your .component.ts file

paymentChange(data) {
  console.log(data); // you can receive both success and resposonse data here 
}

Available Options

OptionsDescription
apiKeyStripe Publishable key
apiSecretStripe Secret key
totalAmountFinal Amount
currencySupported currencies View All
stripeBtnTextPaynow Button Text, Default text is Pay Now
stripeBtnLoadingLoading button text, Default text is Please Wait..
orderIdIt will be passed with Stripe desription
emailIt will be passed with Stripe desription
apiResponseAll success and error data will received here

Donate!

Like my Work! Donate

Keywords

FAQs

Last updated on 12 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc