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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mipong/payments

v2.1.0

Published

Payment Library for Typescript.

Downloads

46

Readme

@mipong/payments

Typescript 를 위한 결제 라이브러리.

Typescript로 strict 하게 쓰여진 결제 라이브러리입니다. 카카오페이, 네이버페이, 토스페이, 토스페이먼츠(PG), 나이스페이먼츠를 손쉽게 개발할 수 있습니다. 결제사별로 결제 플로우는 다르지만, @mipong/payments 는 결제사가 달라도 일관된 함수들로 결제 로직을 작성하게 도와줍니다.


목차


시작하기

1. 환경 변수 주입 (가맹점 키, 시크릿 키)

2. 결제사에 맞는 코드 구현


카카오페이

https://developers.kakao.com/docs/latest/ko/kakaopay/common


카카오페이 코드 예시

  • 단건 결제
    • 결제 요청
    • 결제 승인
  • 정기 결제
    • 정기 결제 고유번호 발급
    • 정기 결제 요청
    • 정기 결제 비활성화
    • 정기 결제 상태 조회
  • 주문 조회
  • 결제 취소

네이버페이

https://developer.pay.naver.com/docs/v2/api#common-common_certi


코드 예시

  • 간편결제 플랫폼
    • 결제 승인
  • 정기/반복결제 플랫폼
    • 등록 완료
    • 등록 해지
    • 등록 내역 조회
    • 결제 예약
    • 결제 승인
  • 공통
    • 결제 취소
    • 결제내역조회

토스페이먼츠

https://docs.tosspayments.com/guides/card


코드 예시

  • 일반 결제
    • 결제 승인
  • 빌링(자동결제)
    • 빌링키 발급하기
    • 빌링키로 결제 요청하기
  • 공통
    • 주문 조회
    • 결제 취소

토스페이

https://tossdev.github.io/api.html


코드 예시

  • 일반 결제
    • 결제 생성
    • 가맹점 결제 승인
  • 빌링(자동결제)
    • 빌링키 발급하기
    • 빌링키로 결제 요청하기
  • 공통
    • 결제 환불
    • 결제 상태 확인

나이스페이먼츠

(현재 카드빌링 기능만 구현)

https://developers.nicepay.co.kr


코드 예시

  • 카드빌링(자동결제)
    • 빌링키 발급하기
    • 빌링키로 결제 요청하기
  • 공통
    • [결제 환불]