npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

loov-solutions-sdk

v1.0.1

Published

Online payment solution

Downloads

9

Readme

loov-solutions-nodejs-sdk

Loov-solutions-nodejs-sdk, is a Node.js SDK that provides a simple interface for integrating with the Loov payment gateway. With LoovPay, you can easily initiate payments and receive payment notifications in your Node.js application.

Loov-solutions-nodejs-sdk instlllation, run the following command in your Node.js project terminal

npm install loov-solutions-sdk

Loov-solutions-nodejs-sdk usage

First require the module in your Node.js application

const LoovSolutionsSdk = require('loov-solutions-sdk');

###Then, create a new instance of the LoovPay class with your app key and merchant key

const loovSolutionsSdk = new LoovSolutionsSdk('your-app-key', 'your-merchant-key');

Init payments

Methods to initiate payments

  getPaymentLink(paymentData):Promise<LoovResponse>

Payin Mobile

Make a mobile money payment

  mobilePayment(paymentData):Promise<LoovResponse>

Check payment status

Checking the status of a payment requires the transaction reference


getPaymentStatus(reference:string):Promise<CheckRefResponse>

Pay Out

Please note that this API is only available to merchants who have subscribed to this service and have been approved by our compliance department.

Be sure to manage the response appropriately in your application to provide users with accurate transaction information.


initPayOut(payload: mobilepayOutRules):Promise<LoovResponse>

How to use the loov payment api

Using the payment sdk is very simple: once you've instantiated your class, you have access to all the api functions.


loovPay.getPaymentLink(paymentData)
  .then(response => {
    // Handle successful payment initiation
  })
  .catch(error => {
    // Handle payment initiation error
  });

loovPay.mobilePayment(paymentData)
  .then(response => {
    // Handle successful mobile payment
  })
  .catch(error => {
    // Handle mobile payment error
  });

  loovPay.getPaymentStatus(paymentReference)
  .then(response => {
    // Handle successful mobile payment
  })
  .catch(error => {
    // Handle mobile payment error
  });

  loovPay.initPayOut(payOutData)
  .then(response => {
    // Handle successful mobile payment
  })
  .catch(error => {
    // Handle mobile payment error
  });
  

LoovPay provides the following methods

  • getPaymentLink(paymentData): Initiates a payment and returns a payment link. paymentData is an object that contains the payment details, including the amount, currency, payment mode, return URL, cancel URL, callback URL, description, and customer details.

  • mobilePayment(paymentData): Initiates a mobile payment and returns a payment token for soft payment. paymentData is an object that contains the payment details, including the amount, operator, phone number, customer details, and callback URL.

  • getPaymentStatus(paymentReference) Loov's API getPaymentStatus method lets you check the payment status of your transactions..

  • initPayOut(payOutData) initPayOut is the method that allows you to make withdrawals from your loov backoffice. To access this service, you must be unreadable.

Payment data object data structure

Mobile payment

{
        amount: 'required|integer|min:500',
        operator: 'required|string',
        phoneNumber: "required|string",
        customer: {
            name: "required|string",
            email: "required|string",
            phoneNumber: "required|string"
        },
        callback_url: "required|string"
}

Payment with Link

{
    amount: "required|integer|min:500",
    currency: "string",
    payment_mode: "string",
    return_url: "string",
    cancel_url: "string",
    callback_url: "string",
    description: "string",
    customer: {
        name: "string",
        email: "string",
        phoneNumber: "string"
    }
}

Pay Out

{
    amount: 'required|integer|min:500',
    operator: 'required|string',
    phoneNumber: "required|string",
    currency: "required|string",
}

Check Payment Status

  /payment/status/${transactionRef}`,

If you need help with LoovPay, you can contact the Loov support team at .

npm version 1.0.0

For more information on LoovPay, see the GitHub repository or the official documentation.