Package Exports
- @fireflysemantics/angular-stripe-service
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@fireflysemantics/angular-stripe-service) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Angular Stripe Service
Stripe service for for Angular components that use stripe.
Usage
constructor(
private cd: ChangeDetectorRef,
private stripeService:AngularStripeService) {}
ngAfterViewInit() {
this.stripeService.setPublishableKey('pk_test_2syov9fTMRwOxYG97AAXbOgt008X6NL46o').then(
stripe=> {
this.stripe = stripe;
const elements = stripe.elements();
this.card = elements.create('card');
this.card.mount(this.cardInfo.nativeElement);
this.card.addEventListener('change', this.cardHandler);
});
}
Stackblitz Demo
https://stackblitz.com/edit/angular-stripe-integration?file=src%2Fapp%2Fapp.component.ts