0.0.2 • Published 5 years ago

node-webpayby v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

node-webpayby

Node module for Webpay signature.

var Webpay = require('node-webpayby');

Functions

Create signature.

Return string.

var signature = Webpay.createSignature({
  '*scart': '',
  wsb_version: 2,
  wsb_storeid: 'store_id',
  wsb_order_num: '3',
  wsb_currency_id: 'BYN',
  wsb_seed: Date.now(),
  wsb_test: 1,
  wsb_invoice_item_name: ['test'],
  wsb_invoice_item_quantity: [1],
  wsb_invoice_item_price: [10],
  wsb_total: 10,
  wsb_notify_url: 'http://notify.url.by/',
}, 'secret_key');

Check signature.

Return boolean.

var check = Webpay.checkSignature({
  batch_timestamp, 
  currency_id, 
  amount,
  payment_method, 
  order_id,
  site_order_id,
  transaction_id, 
  payment_type, 
  rrn,
  wsb_signature, 
}, 'secret_key');

Test

npm run test

License

MIT

0.0.2

5 years ago

0.0.1

6 years ago

0.0.0

6 years ago