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

webpay-by

v0.0.12

Published

Webpay.by form fields api for Belarus payment system

Downloads

15

Readme

webpay-by

webpay-by

d v

Webpay.by form fields api for Belarus payment system

  • axios
  • typescript (autocomplete all filed)

ideal for express micro-service

Generate form

import { WebPayForm } from 'webpay-by'

const isTest = process.env.NODE_ENV === 'development'

const webpay = new WebPayForm({
  fields: {
    wsb_storeid: isTest ? '444433331' : '444433333',
    wsb_store: 'store_name',
    wsb_test: isTest ? 1 : 0,
    wsb_order_num: `31467`,
    wsb_customer_name: 'Alex Bream',
    wsb_email: '[email protected]',
    wsb_phone: '+375172198434',
    wsb_notify_url: `https://mysite.com/pay/notify`,
    wsb_return_url: `https://mysite.com/pay/success`,
    wsb_cancel_return_url: `https://mysite.com/pay/cancel`,
    wsb_startsesstime: +new Date(),
  },
  secret: 'adsd231edqsada4',
})

webpay.addItem({
  name: `Apple iPhone XR 64GB`,
  price: 1200,
  quantity: 1,
})

webpay.getForm()

and see vue component in examples folder

CheckSign

use node module crypto (not support in browser)

import { checkSign } from 'webpay-by'

const result = checkSign(
  {
    batch_timestamp,
    currency_id,
    amount,
    payment_method,
    order_id,
    site_order_id,
    transaction_id,
    payment_type,
    rrn,
  },
  'adsd231edqsada4'
)

if (!result) {
  console.log('error checking sign')
}

inspired node-webpayby

TODO

  • add examples