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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-khalti-sdk

v1.0.2

Published

react-native wrapper for khalti iOS and android sdks

Downloads

19

Readme

banner

react-native-khalti-sdk

React-native wrapper for khalti iOS and android sdks. Currently this sdk only supports payment through khalti.

example

To run the example clone the repo, go to the example folder, yarn , pod install and yarn ios/android.

Installation

npm install react-native-khalti-sdk

or

yarn add react-native-khalti-sdk

Android

Step 1

Create a folder named xml inside the res folder of android and add a file with name network_security_config.xml and paste the following code.

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true" />
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">192.168.52.25</domain>
        <domain includeSubdomains="true">192.168.52.20</domain>
        <domain includeSubdomains="true">192.168.52.22</domain>
        <domain includeSubdomains="true">192.168.52.127</domain>
        <domain includeSubdomains="true">192.168.52.99</domain>
        <domain includeSubdomains="true">192.168.1.195</domain>
        <domain includeSubdomains="true">a.khalti.com</domain>
        <domain includeSubdomains="true">192.168.52.28</domain>
        <domain includeSubdomains="true">192.168.52.38</domain>
        <domain includeSubdomains="true">192.168.12.106</domain>
        <domain includeSubdomains="true">192.168.52.133</domain>
        <domain includeSubdomains="true">192.168.52.126</domain>
        <domain includeSubdomains="true">192.168.52.161</domain>
        <domain includeSubdomains="false">localhost</domain>
    </domain-config>
</network-security-config>

Step 2

Then goto the manifest.xml and add

android:allowBackup="true"
android:networkSecurityConfig="@xml/network_security_config"

in the application section.

Step 3

./gradlew clean

iOS

Step 1

Add url scheme as "KhaltiPayExampleScheme" in the URL types section.

Step 2

install cocoapods-user-defined-build-types

Step 3

Add the following in your podfile (see example ios for reference)

plugin 'cocoapods-user-defined-build-types'

enable_user_defined_build_types!

Step 3

Add the following line and run pod install

pod 'react-native-khalti-sdk', :build_type => :dynamic_framework

Usage

import KhaltiSdk from "react-native-khalti-sdk";

...
    try {
      const result = await KhaltiSdk.startKhaltiSdk(
        merchantKey,
        productName,
        productId,
        productUrl,
        amount,
        additionalData,
        'KhaltiPayExampleScheme'
      );
      console.log({ result });
    } catch (e) {
      console.log({ e });
    }

Contributing

License

MIT