1.1.8 • Published 3 years ago

hanif-midtrans-node v1.1.8

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

🛒 Midtrans-Node

Unofficial Midtrans API wrapper for NodeJS. 💡 I created this to make it easier for me to integrate some of 🛠 my projects using 🛒 Midtrans, the methods I created here are available from Rest API, Snap, and Iris API 😎.

Quick Start

🤔 Installation

You need to install the package first!

npm install hanif-midtrans-node

yarn add hanif-midtrans-node

pnpm install hanif-midtrans-node

Usage 🤟

You just need a midtrans server key from https://dashboard.midtrans.com. And, you're ready to code!

import { MidtransNode } from 'hanif-midtrans-node';

// new MidtransNode(isProduction, midtransServerKey);
const midtrans = new MidtransNode(false, 'YOUR MIDTRANS SERVER KEY'); // sandbox mode

midtrans.createTransaction({
    transaction_details: {
        gross_amount: 20000, // IDR 20.000
        order_id: 'midtrans-node',
    },
}).then(console.log).catch(console.error);

And, that's it! Also, docs is availabe on https://hansputera.github.io/midtrans-node

License

MIT

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1-beta

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago