ayoopo-test-library
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

How To Use Ventaja Library

  • IMPORT Ventaja Module In AppModule
    import {Module} from "@nestjs/common";
    import {AyoopoModule} from "ventaja-nest-library";
    @Module({
        imports: [
            AyoopoModule.forRoot({
                certificatePath: "./private.key",
                ventajaUrl: "https://demo.ventaja.com/",
                id: "131191912345",
                uid: "compiler",
                pwd: "password@1234",
                countryCode: "IN"
            })],
        providers: [AppService],
        controllers: [AppController]
})
export class AppModule {
}
  • IMPORT Ventaja Service in AppService
import {HttpService, Injectable, InternalServerErrorException} from "@nestjs/common";
import {ConfigService} from "./config.service";
import {VentajaService} from "ventaja-nest-library";

@Injectable()
export class WalletService {

    constructor(
        private readonly configService: ConfigService,
        private readonly httpService: HttpService,
        private readonly ventajaService: VentajaService
        ) {
    } // End of constructor

    public async getBalance(): Promise<any> {

        try {
            const balanceInfo = await this.ventajaService.getBalance();
            // Add your business logic here
            return balanceInfo;
        } catch (error) {
            return error
        }
    }
}

| Ventaja Functions | Category | purpose | | ----------------- | :------- | : ----- | | getBalance | Bill Payments | returns balance info | | validateTopUpWallet | Bill Payments | validates data | | topUpWalletProcess | Bill Payments | process top up wallet | | topUpTransactionInquiry | Bill Payments | top up transaction inquiry | | processReservationDetail | Bill Payments | reservation detail | | validateReservationPaymentDetail | Bill Payments | validate reservation details data | | processReservationPayment | Bill Payments | process reservation payment | | reservationPaymentEnquiry | Bill Payments | reservation payment inquiry | | pullTransactionDetails | Bill Payments | pull transaction details | | validateBilling | Bill Payments | validate billing data | | processBilling | Bill Payments | process billing data |

@ Credits Flexm

Readme

Keywords

Package Sidebar

Install

npm i ayoopo-test-library

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

63.9 kB

Total Files

59

Last publish

Collaborators

  • satyamobifyi