💶 The package allows you accept payment using Lazerpay in your react native mobile app ⚡️

Overview

Lazerpay Official react-native sdk

Lazerpay SDK allows you accept payments easily in your react-native application

screenshot of SDK

screenshot of SDK

screenshot of SDK

screenshot of SDK

Installation

npm install lazerpay-react-native

Also install react-native-webview because it's a dependency for this package. Here's a link to their docs.

Usage

import { LazerPay } from 'lazerpay-react-native';

const InitiatePayment = () => {
  const [openSDK, setopenSDK] = useState(false);

  return (
    <View>
      <LazerPay
        {...{
          publicKey: 'PUBLIC_KEY',
          customerName: 'CUSTOMERS FULL NAME',
          customerEmail: 'CUSTOMER EMAIL',
          currency: 'CURRENCY', // USD, NGN, AED, GBP, EUR
          amount: '10', // amount as a number or string
          onSuccess: (response) => {
            // handle response here
          },
          onClose: () => setopenSDK(false),
          onError: (response) => {
            // handle responsne here
          },
          openSDK,
        }}
      />

      <TouchableOpacity onPress={() => setopenSDK(true)}>
        <Text> Initiate Payment</Text>
      </TouchableOpacity>
    </View>
  );
};

Configuration Options

publicKey

string: Required Your public key can be found on your dashboard settings.

customerName

string: Required The name of the customer trying to make payments

customerEmail

string: Required The email of the customer trying to make payments

currency

string: Required The name of the fiat currency the merchant accepts

amount

number | string: Required The amount you want to charge the user in currency

businessLogo

string: Required The logo of your business as url in string

onSuccess

(response) => { Void }: Required This is called when a transaction is successfully. It returns a response.

onError

(response) => { Void }: Required This is called when a transaction fails. It returns a response.

onClose

() => { Void }: Required This is called when a user clicks on the close button.

The Transaction JSON returned for successful events

{
  "event": "successful",
  "data": {
    "id": "12896b32-0d7d-4744-bc15-5960af40d519",
    "reference": "aa6KlHy88D",
    "senderAddress": "0x0B4d358D349809037003F96A3593ff9015E89efA",
    "recipientAddress": "0x785F44E779cfEeDeBf7aA7CFde19DaA3312fd19e",
    "actualAmount": 10,
    "amountPaid": 10,
    "fiatAmount": 10,
    "coin": "BUSD",
    "currency": "USD",
    "hash": "0x3332d7b046d53e90dc0337c715252f210386c2a471c5025c953a0b1d9bc90593",
    "blockNumber": 14160827,
    "type": "received",
    "status": "confirmed",
    "network": "mainnet",
    "blockchain": "Binance Smart Chain",
    "customer": {
      "id": "b847dbbd-e5a4-4afc-ba26-b292707dc391",
      "customerName": "Njoku Emmanuel",
      "customerEmail": "[email protected]",
      "customerPhone": null,
      "network": "mainnet"
    }
  }
}

Configuration Options for Making Payments

openSDK

boolean: Required

This is a prop to display/hide the sdk

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Support

If you're having trouble with Lazerpay React Native SDK or your integration, please reach out to us at [email protected] or come chat with us on Slack. We're more than happy to help you out.

License

MIT

You might also like...

The open ransomware payment tracker

ransomwhere The open ransomware payment tracker Setup Install development dependencies in backend by running npm install. Development Open index.html

Dec 13, 2022

🔑 Keagate is an open-source, high-performance alternative to popular cryptocurrency payment gateways such as Coinbase Commerce, CoinGate, BitPay, NOWPayments, CoinRemitter, CoinsPaid and more.

🔑 Keagate is an open-source, high-performance alternative to popular cryptocurrency payment gateways such as Coinbase Commerce, CoinGate, BitPay, NOWPayments, CoinRemitter, CoinsPaid and more.

⛩️ Keagate – A High-Performance Cryptocurrency Payment Gateway 🚧 This project is actively in development 🚧 Table of Contents About the Project Purpo

Jan 3, 2023

Unofficial Chapa Payment Implementation with Express.js

Chapa Payment Integration This is Unofficial implementation of payment with Chapa API using expressjs Getting started To get the Node server running l

Nov 7, 2022

FlexiPay is a flexible payment solution for DAO Events.

FlexiPay is a flexible payment solution for DAO Events.

Problem Statement Ever thought about not attending the event further right when it’s ongoing? Ever felt like the money you paid for an event isn’t wor

Nov 24, 2022

JellyChain1 is a blockchain network platform that supports smart contracts and can act as a payment system/cryptocurrency

JellyChain1 is an experimental blockchain network, that will serve as a starter blockchain test network and scale out database software and other applications. JellyChain1 is created to cut energy costs when mining transactions on the blockchain.

Dec 1, 2022

Backend Microservice & Payment Gateway System

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

May 9, 2023

To-do list" is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to mark them as complete. I build a simple website that allows for doing that, and I do it using ES6 and Webpack!

To-do list

Project Name : TO-Do list "To-do list" is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to mar

Aug 22, 2022

Allows the public to easily report and track the geolocation of anyone or anything they spot outside, using a mobile app or web frontend.

Allows the public to easily report and track the geolocation of anyone or anything they spot outside, using a mobile app or web frontend.

LIVE DEMO: https://armytracker.com/ (tracking the invading Russian army in Ukraine) Attention: - If you'd like to help the project either as a program

Mar 27, 2022
Comments
  • added fix for white screen issue

    added fix for white screen issue

    This PR fixes the issue of white screens when the webview loads up. We still need to decide where to host the html so we can add the link on LazerPay.tsx

    opened by franko4don 0
  • Harlem Capital (https://harlem.capital/) would to learn more about LazerPay

    Harlem Capital (https://harlem.capital/) would to learn more about LazerPay

    hey Njoku 👋🏾 I'd love to connect you to the amazing team at Harlem Capital where I'm helping to scout the best startups in the world for investment.

    They are some of the most active investors in crypto and fintech and are looking to invest further into the space, particularly within Africa. I've been following LazerPay for a while and I've been really impressed by your story, the product, and all your progress so far.

    Would love to get an introductory call and help connect you if you're looking for investment in the future. Book a time at this link and I'd love to meet you and learn more about LazerPay.

    If you're a bit busy at the moment feel free to forward any pitch deck or investment memo to my email: [email protected]

    Thanks! - Helom

    opened by helomberhane 1
Releases(v0.2.22)
Owner
LazerPay
Lazerpay Finance
LazerPay
Cindy Dorantes 12 Oct 18, 2022
Awesome Pay - This is a virtual payment module made from react

Awesome Pay - This is a virtual payment module made from react

AhhyunLee 5 Jun 18, 2022
App that allows you to control and watch YouTube videos using hand gestures. Additionally, app that allows you to search for videos, playlists, and channels.

YouTube Alternative Interaction App An app I made with Edward Wu that allows you to search and watch videos from YouTube. Leverages Google's YouTube D

Aaron Lam 2 Dec 28, 2021
The friendly way to accept tips in ETH.

?? cryptip.me The friendly way to accept tips in ETH. It's free, and no setup required. cryptip.me/your-ens-or-wallet-address Getting Started Project

spidΞy 11 Sep 23, 2022
A simple easy to use vanilla JavaScript library for creating input fields that accept multiple email addresses

MeiMei - Multiple Email Input MeiMei: A simple easy to use vanilla JavaScript library for creating input fields that accept multiple email addresses.

Lars Straathof 1 Apr 13, 2022
A beginner friendly hacktoberfest2022 repo made lately to accept valid open source contribution.

Hacktoberfest2022 A hacktoberfest2022 repo made lately to accept valid open source contribution. What is Hacktoberfest? Hacktoberfest is digitalocean’

One Teacher One 5 Oct 20, 2022
Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App

iSlider iSlider is a lightweight, high-performant, no library dependencies cross-platform slide controller. It can help handling most sliding effects,

Baidu BEFE 1.7k Nov 25, 2022
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022