novinopay-client
v2.2.1
Published
Novinopay-client is a Nodejs client for Novinopay internet payment gateway API.
Downloads
17
Readme
Table of Contents
About
Get a Merchant ID from Novinopay and start working with this library easily. It's a fairly simple and light-weight package, requires no settings or setup at all and It can make payments and verify them via promises with zero complications using the same type definitions and input names as the Official Docs.
Getting Started
Prerequisites
npm i novinopay-client
Usage
Initializing
Create a new Instance of Client
const client = new NovinoPayClient("merchantID");
If you want to test the sandbox, then:
const client = new NovinoPayClient("test")
or swap to sandbox while developing, not changing the marchant ID
const client = new NovinoPayClient("merchantID", true)
Making a Payment
const response = await client.PaymentRequest({
amount: 10000,
callbackUrl: "http://localhost:3000/PaymentCallbackURL",
description: "Product 1",
invoice_id: "Order 1 ID",
mobile: "",
Email: "",
});
Verify a Payment
const response = await client.PaymentVerify({
amount: 10000,
authority: "Authority id recieved from callback url parameters or Payment response",
});
// always checks if verification amount is the same as the amount issued by your Payment request
and it's not manipulated by user.