freekassa-node

2.0.0 • Public • Published

Generate URL for payment in Freekassa (Old Free-kassa).

Installation

npm i freekassa-node

Usage

const freekassa = require("freekassa-node");

console.log(
  freekassa(
    {
      oa: "99",
      o: "ID_234",
      m: "14963",
      currency: "USD",
    },
    "secret_word_1"
  )
);
/* =>
{
    "signature": "dfc2448091e2cc4191fc283435593e21",
    "url": "https://pay.freekassa.ru/?
        oa=99&
        o=ID_234&
        m=14963&
        currency=USD&
        s=dfc2448091e2cc4191fc283435593e21"
}
 */

console.log(
  freekassa(
    {
      AMOUNT: "99",
      MERCHANT_ORDER_ID: "ID_234",
      MERCHANT_ID: "14963",
    },
    "secret_word_2"
  )
);
/* =>
{
    "signature": "c0905625cf96d7730487a4dda69c6a09"
}
 */

API

freekassa(params, word)

params

Type: object

URL parameters.

word

Type: string

Freekassa secret word 1|2.

Test

npm test

Package Sidebar

Install

npm i freekassa-node

Weekly Downloads

13

Version

2.0.0

License

MIT

Unpacked Size

3.26 kB

Total Files

4

Last publish

Collaborators

  • botaniqqq