1.0.2 • Published 7 years ago
kouber v1.0.2
kouber
Installation
$ npm install --save kouberHow to use
- Import
kouberto your node project file (e.g.main.js)
const { khaltiCheckout } = require("kouber");- Call
khaltiCheckoutfunction 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"});Now use the
browserifycommand to build a bundle starting at your project file (main.jsin this example):- Install
browserify(globally) with this command.
$ npm install browserify -g- Bundle the project file.
$ browserify main.js -o main-bundle.js- Install
Create a button in your HTML document with the
idpreviously used inkhaltiCheckoutmethod. 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