1.0.2 • Published 6 years ago

kouber v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

kouber

Installation

$ npm install --save kouber

How to use

  1. Import kouber to your node project file (e.g. main.js)
const { khaltiCheckout } = require("kouber");
  1. Call khaltiCheckout function with required arguments.
khaltiCheckout({productId: "123", publicKey: "test_public_key_dc74e0fd57cb46cd93832aee0a390234", productName: "Test product", productUrl: "https://example.com/", amount: 1000, buttonId: "khalti-payment-button", secretKey: "test_secret_key_12312lO"});
  1. Now use the browserify command to build a bundle starting at your project file (main.js in this example):

    • Install browserify (globally) with this command.
    $ npm install browserify -g
    • Bundle the project file.
    $ browserify main.js -o main-bundle.js
  2. Create a button in your HTML document with the id previously used in khaltiCheckout method. Import the bundled file to the HTML document.

<button id="khalti-payment-button">Pay with Khalti</button>

<script src="main-bundle.js"></script>

Todos

  • Implement eSewa checkout for web
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago