1.0.2 • Published 3 years ago

ayoopo-test-library v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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 FunctionsCategorypurpose
getBalanceBill Paymentsreturns balance info
validateTopUpWalletBill Paymentsvalidates data
topUpWalletProcessBill Paymentsprocess top up wallet
topUpTransactionInquiryBill Paymentstop up transaction inquiry
processReservationDetailBill Paymentsreservation detail
validateReservationPaymentDetailBill Paymentsvalidate reservation details data
processReservationPaymentBill Paymentsprocess reservation payment
reservationPaymentEnquiryBill Paymentsreservation payment inquiry
pullTransactionDetailsBill Paymentspull transaction details
validateBillingBill Paymentsvalidate billing data
processBillingBill Paymentsprocess billing data

@ Credits Flexm