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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ijodkor/nest-payme

v1.0.7

Published

NestJs ilovalar uchun Payme ETT bilan integratsiya qilish uchun kutubxona.

Readme

Payme - Elektron to‘lov tizimi

NestJs ilovalar uchun Payme ETT bilan integratsiya qilish uchun kutubxona.

Payment gateway integrator package for NestJs App

O‘rnatish va sozlash (Installation and setup)

O‘rnatish (installation)

npm install @ijodkor/nest-payme

Muhit o‘zgaruvchilari (Environment variables)

PAYME_SUBSCRIPTION_API_URL=
PAYME_MERCHANT_ID=
PAYME_MERCHANT_KEY=

Foydalanish (Usage)

Namuna (example)

import {HttpException, Inject, Injectable} from '@nestjs/common';
import {Cache as MCache, CACHE_MANAGER} from "@nestjs/cache-manager";
import {CardService, ReceiptService} from "payme";
import {v4 as uuidV4} from 'uuid';

import {PaymentTransactionService} from "@/modules/balance/transaction/payment-transaction.service";
import {PreparePaymentDto} from "@/modules/account/dto/payment/prepare-payment.dto";
import {PayPaymentDto} from "@/modules/account/dto/payment/pay-payment.dto";
import {ProductService} from "@/modules/account/services/product.service";

@Injectable()
export class PaymentService {

    constructor(
        @Inject(CACHE_MANAGER) private cacheManager: MCache,
        private readonly transactionService: PaymentTransactionService,
        private readonly receiptService: ReceiptService,
        private readonly cardService: CardService,
    ) {
    }

    public async prepare(dto: PreparePaymentDto) {
        // Create a token
        const {token} = await this.cardService.create(dto);

        // Get code for verifying
        await this.cardService.getCode(token);

        // Create new receipt (there is account contains only uuid)
        const account = {};
        const receipt = await this.receiptService.create(
            account,
            dto.amount,
            {
                receipt_type: 0,
                items: [
                    {
                        title: "Xizmat",
                        price: dto.amount,
                        discount: 0,
                        count: 1,
                        code: "10305001001000000",
                        package_code: "1504169",
                        vat_percent: 0
                    }
                ]
            }
        );

        // Create transaction
        // ...
        // Store token to cache

        return {
            account,
            amount: receipt.amount
        }
    }

    async pay(dto: PayPaymentDto) {
        // Verify code
        await this.cardService.getCode(dto.code);

        // Get token from cache
        const token: any = "..."

        // Find transaction
        const {receiptId, balanceId} = await this.transactionService.findById(dto.uuid);

        // Verify card
        await this.cardService.verify(token, dto.code);

        // Pay by card
        const receipt = await this.receiptService.pay(receiptId, token);

        // Update transaction status
        await this.transactionService.completed(dto.uuid);

        return receipt;
    }
}

Registration

hidden - exclude from Swagger

// Register for feature
SubscriptionModule.forFeature({
  hidden: false,
  // options: {
  //   auth: AuthOption.BASIC_AUTH,
  //   params: {
  //     username: '12',
  //     password: '12',
  //   },
  // },
})

// Registar async
SubscriptionModule.registerAsync({
  hidden: false,
  useFactory: () => ({
    auth: AuthOption.ANY,
    useFactory: () => {
      return true
    }
  })
})

Mavjud xizmatlar

  • Subscribe API

Foydalanilgan manbalar (References)

Links