nestjs-paystack implements a paystackModule, which when imported into
your nest modules project provides a Paystack client to any class that injects it.
Installation
npm install --save nestjs-paystack
Getting Started
The simplest way to use nestjs-paystack is to import the forRoot function from PaystackModule into the module in which you want to inject the service.
import{Module}from'@nestjs-common';
import{PaystackModule}from'nestjs-paystack';
@Module({
imports:[
Paystackmodule.forRoot({
apiKey:'sk_xxxxxxxxx',
}),
],
})
exportclassAppModule{}
You can then inject the Paystack client into your injectable classes by using a
custom InjectPaystack decorator