npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

digitpay-angular

v0.1.1

Published

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.

Readme

DigitpayAngular

This library was generated with Angular CLI version 17.3.0.

Install packages

Run


npm  i  digitpay-angular

to install library.

Enable assets

In angular.json, add this line

	"architect": {
		"build": {
			"builder": "@angular-devkit/build-angular:application",
			"options": {
				"outputPath": "dist/app",
				"index": "projects/app/src/index.html",
				"browser": "projects/app/src/main.ts",
				"polyfills": [
					"zone.js"
				],
				"tsConfig": "projects/app/tsconfig.app.json",
				"inlineStyleLanguage": "scss",
				"assets": [
					"projects/app/src/favicon.ico",
					"projects/app/src/assets",
					//add this to assets
					{
						"glob": "**/*",
						"input": "./node_modules/digitpay-angular/assets",
						"output": "assets"
					}
				],
			}
		}
	}

Import DigitpayAngular component

In standalone component

You can import **DigitpayAngular** component directly in component where you want 			to use it.
	//import **DigitpayAngularComponent**
	import {DigitpayAngularComponent} from  'digitpay-angular'

	@Component({
	selector: 'app-root',
	standalone: true,
	imports: [DigitpayAngularComponent], //Add to component imports tag
	templateUrl: './app.component.html',
	styleUrl: './app.component.scss'
	})
	export  class  AppComponent  implements  OnInit{

In non standalone component

Add DigitpayAngular to import in module app like this :

//import **DigitpayAngularComponent**
import { DigitpayAngularComponent } from 'digitpay-angular'

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    DigitpayAngularComponent, //Add to imports
  ],
  providers: [provideClientHydration()],
  bootstrap: [AppComponent],
})
export class AppModule {}

Import cdn link for fadapay payment in index.html head balise

Put

 <script src="https://cdn.fedapay.com/checkout.js?v=1.1.7"></script>

in index.html head balise.

Provide payments methods credential

DigitpayAngular Supporte three payments methods : stripe ,paypal and fedapay . So you need to provide these credentials(public key or secret key). To achieve that , you need to inject DigitpayAngularService in your component and provide method key respectively.

//Import **DigitpayAngularService** service
import { DigitpayAngularComponent, DigitpayAngularService } from 'digitpay-angular'

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [RouterOutlet, DigitpayAngularComponent],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss',
})
export class AppComponent implements OnInit {
  title = 'app'

  private digitPayAngularService = inject(DigitpayAngularService)

  ngOnInit(): void {
    // provide fedapay key if your want to use it
    this.digitPayAngularService.fedapayKey = 'Your_public_fedapay_key'
    // provide paypal client key key if your want to use it
    this.digitPayAngularService.paypalClienId = 'Your_paypal_clientId_key'
    // provide stripe public and secret key if your want to use stripe
    this.digitPayAngularService.stripePublicKey = 'Your_stripe_public_key'
    this.digitPayAngularService.stripeSecretKey = 'your_stripe_secret_key'
  }
}

Use component

In your template

<digitpay-angular [paiementMethodsAlowed]="['stripe','fedapay','paypal']" [transaction_data]="{amount : 500, currency : 'XOF'}" (transactionStatus)="handleStatus($event)"> </digitpay-angular>

paiementMethodsAlowed : Optionnal .when not set or has value [], all payment methods appear transaction_data : Required .{amount : number,currency : 'XOF' | 'USD' | 'EUR'} customer_data : Optionnal, Use it when you use fedapay. type { email : string, lastname:string, firstname:string} feda_custom_meta_data : Other data to set in custom_meta_data transactionStatus : Event to handle transaction status, success or fail