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

binance-pay

v0.1.1

Published

Aceptar pagos atraves de BINANCE en tu WEB/APP

Downloads

11

Readme

Paquete Binance Pay

This package provides functions to interact with Binance Pay, using nodejs or nextjs server-side.

The first thing you have to do is to create an account in the binance exchange you can do it from this link :D, once you have created your account, go to binance merchant if you want to test you can create an api key and a secret key for free, otherwise you must verify the merchant profile where you will be asked for some income data, once you finish the verification you can use it naturally and you can proceed with the use.

Instalación

npm install binance-pay

Uso

createOrder

create a payment order

const { createOrder } = require('binance-pay');
or
import {createOrder} from 'binance-pay'

const order = await createOrder({
  name: "service",
  description: "Descripción del pedido",
  price: 1.5,
  APIKEY: "tu-api-key",
  SECRETKEY: "tu-secret-key",
  goodsCategory: "0000",
  referenceGoodsId: "01010102",
  goodsType: "01",
});

createOrder response example

{
  "status": "SUCCESS",
  "code": "000000",
  "data": {
    "currency": "USDT",
    "totalFee": "1.5",
    "prepayId": "270342174837137408",
    "terminalType": "APP",
    "expireTime": 1703728285249,
    "qrcodeLink": "https://public.bnbstatic.com/static/payment/20231228/a69a78ab-ce5c-465d-9bc9-6e5109411263.jpg",
    "qrContent": "https://app.binance.com/qr/dplk1599fb0902e44cc396bd399af72f6752",
    "checkoutUrl": "https://pay.binance.com/en/checkout/e84a6776f6f843b4b9e65790f3845ef8",
    "deeplink": "bnc://app.binance.com/payment/secpay?tempToken=6TKaMw57DrMr1iM2nogN2xbBFST28hyS",
    "universalUrl": "https://app.binance.com/payment/secpay?linkToken=e84a6776f6f843b4b9e65790f3845ef8&_dp=Ym5jOi8vYXBwLmJpbmFuY2UuY29tL3BheW1lbnQvc2VjcGF5P3RlbXBUb2tlbj02VEthTXc1N0RyTXIxaU0ybm9nTjJ4YkJGU1QyOGh5Uw"
  }
}

queryOrder

Consulta una orden existente.

const { queryOrder } = require('binance-pay');
or
import {queryOrder} from 'binance-pay'


const query = await queryOrder({
  prepayId: "270342174837137408",
  APIKEY: "tu-api-key",
  SECRETKEY: "tu-secret-key",
});

queryOrder response example

{
  "status": "SUCCESS",
  "code": "000000",
  "data": {
    "merchantId": 216447206,
    "prepayId": "270342174837137408",
    "merchantTradeNo": "21dd27fb18486d0258cebff133c201d7",
    "status": "INITIAL",
    "currency": "USDT",
    "createTime": 1703724685342,
    "orderAmount": "1.50000000"
  }
}

Additional Documentation

binance merchant

Contribute

All contributions are welcome! Please follow our contribution guidelines.

License

This project is licensed under the MIT license.

Paquete Binance Pay

Este paquete proporciona funciones para interactuar con Binance Pay.

...

Enlaces

...

Contribuir

¡Todas las contribuciones son bienvenidas!

Licencia

Este proyecto está bajo la licencia MIT.