# moru-web-sdk

> Moru Payment Gateway

Latest version **1.0.3** (published 2021-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install moru-web-sdk
pnpm add moru-web-sdk
yarn add moru-web-sdk
bun add moru-web-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-10-27 |
| First published | 2021-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Moru |
| Maintainers | sbmdkl |

## Links

- npm: https://www.npmjs.com/package/moru-web-sdk
- npm.io page: https://npm.io/package/moru-web-sdk

## Recent versions

- 1.0.3 (latest) — 2021-10-27
- 1.0.2 — 2021-09-10
- 1.0.1 — 2021-09-06
- 1.0.0 — 2021-09-02

## README

# moru-web-sdk

[![NPM](https://img.shields.io/npm/v/moru-web-sdk.svg)](https://www.npmjs.com/package/moru-web-sdk) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

Moru Payment Gateway web sdk <a href="https://moru-digital-wallet.github.io/moru-payment-gateway-docs/#/">Read Full Documentation</a>.

## Installation

```bash
yarn add moru-web-sdk
npm install moru-web-sdk
```

## Usage

```jsx
import { MoruCheckout } from 'moru-web-sdk';

function App() {
  const options = {
    access_key: 'test_9425294388834bdface7d1b58fd538bf67627d9408fe4f2589820cf550a5003d',
    transaction_id: '1',
    additional_fields: {
      name: 'Shubham Dhakal',
      email: 'shubham@gmail.com',
    },
    callback_handler: {
      onSuccess: (response) => {
        console.log(response);
        // call your api
        alert('success');
      },
      onError: (error) => {
        console.log(error);
        alert('failure');
      },
      onClose: (error) => {
        console.log(error);
      },
    },
  };
  const checkout = new MoruCheckout(options);
  const handleMoruPayment = () => {
    checkout.open({ amount: 100 });
  };
  return (
    <div>
      <button onClick={handleMoruPayment}>Pay with Moru</button>
    </div>
  );
}

export default App;
```

## Demo

[Moru web sdk demo](https://sandbox.moru-payment-gateway.pnpl.com.np/sdk/test/payment.html)

---
_Source: https://npm.io/package/moru-web-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
