Socket
Socket
Sign inDemoInstall

bkash

Package Overview
Dependencies
13
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bkash

bKash API client for Browser & Node.js


Version published
Weekly downloads
8
decreased by-11.11%
Maintainers
1
Install size
768 kB
Created
Weekly downloads
 

Changelog

Source

[0.3.0] - 2018-12-22

Added

  • Updated API version: v1.1.0-beta

Readme

Source

node-bkash

bKash API client for Browser & Node.js

bKash API docs: https://developer.bka.sh/v1.0.0-beta/reference

Installation

via npm:

$ npm install bkash --save

via yarn:

$ yarn add bkash

Usage

Browser

<script src="https://unpkg.com/bkash/dist/bkash.min.js"></script>
<script>
  const bkash = new BKash(clientOptions)
</script>

Node

const BKash = require('bkash')

const clientOptions = {
  mode: 'sandbox', // sandbox/pay
  type: 'checkout' // checkout/payments
}

const bkash = new BKash(clientOptions)

// https://developer.bka.sh/v1.0.0-beta/reference#querypaymentusingget
bkash.queryPayment({
  paymentID: '42'
}).then(({ data, error, headers, meta }) => {
  // data  -> HTTP Status Code < 400
  // error -> HTTP Status Code >= 400
}).catch(err => {
  // HTTP Status Code >= 500
})

Authentication

// required for token.grant and token.refresh methods
bkash.authenticate({
  type: 'simple',
  username: '...', // headers[`username`]
  password: '...'  // headers[`password`]
})

// required for all other methods
bkash.authenticate({
  type: 'token',
  token: '...',      // headers[`authorization`]
  appkey: '...'     // headers[`x-app-key`]
})

Changelog

Changelog for node-bkash

License

Licensed under the MIT License. Check the LICENSE file for details.

Keywords

FAQs

Last updated on 22 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc