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

react-native-pz-checkout-kit

v2.0.5

Published

The Payments Standard Checkout Kit React Native SDK allows you to integrate Payment Gateway of Payments into your application. This SDK has been designed to minimise the complexity of handling and integrating payments in your React Native project.

Downloads

913

Readme

react-native-pz-checkout-kit

npm NPM Version NPM Downloads install size

NPM

React Native wrapper around our Android and iOS mobile SDKs

The following documentation is only focussed on the react-native wrapper around our Android and iOS sdks. To know more about our react-native SDK, refer to the following documentation -

https://docs.paymentz.com/integration/react-native-integration.php

To know more about Paymentz payment flow and steps involved, read up here: https://docs.paymentz.com/integration/

Installation

Installation

Using npm:

npm install --save react-native-pz-checkout-kit

or using yarn:

yarn add react-native-pz-checkout-kit

For Expo Users:

npx expo install react-native-pz-checkout-kit

Requirements

Requirements

  • iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+
  • Xcode 11+
  • Swift 5.1+

Linking

Linking

Automatic

For React Native 0.60+

# install
npm install react-native-pz-checkout-kit --save
cd ios && open podfile # Change the platform from iOS 9.0 to 10.0
pod install && cd .. # CocoaPods on iOS needs this extra step
# run
yarn react-native run-ios

For React Native 0.59 and lower

  1. $ npm install react-native-pz-checkout-kit --save // Install the Paymentz React Native Standard SDK using the npm command.

  2. react-native link react-native-pz-checkout-kit // Link the SDK with React Native Project using Xcode.

Manual

Add the following line to your build targets in your Podfile

pod 'react-native-pz-checkout-kit', :path => '../node_modules/react-native-pz-checkout-kit'

Then run pod install

In XCode, in the project navigator:

  • Right click Libraries
  • Add Files to [your project's name]
  • Go to node_modules/react-native-pz-checkout-kit
  • Add the .xcodeproj file

In XCode, in the project navigator, select your project.

  • Add the libRNDeviceInfo.a from the deviceinfo project to your project's Build Phases ➜ Link Binary With Libraries
  • Click .xcodeproj file you added before in the project navigator and go the Build Settings tab. Make sure All is toggled on (instead of Basic).
  • Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React and $(SRCROOT)/../../React
  • Mark both as recursive (should be OK by default).

Run your project (Cmd+R)

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.pzcheckoutkit.WebViewManagerPackage; to the imports at the top of the file
  • Add new WebViewManagerPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-pz-checkout-kit'
    project(':react-native-pz-checkout-kit').projectDir = new File(rootProject.projectDir,   '../node_modules/react-native-pz-checkout-kit/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
    implementation project(':react-native-pz-checkout-kit')

Note for Expo Applications:

After adding the react-native-pz-checkout-kit package,the option to prebuild the app must be used(this generates the android/ios platform folders in the project to use native-modules). Command for which,

npx expo prebuild

After which the application will be installed on the device/emulator.

npx expo run:[ios|android] --device

Usage


import { PaymentzCheckoutKit, RequestParameter } from 'react-native-pz-checkout-kit'

const requestParameters: RequestParameter = {
    "amount": amount,
    "city": "Mumbai",
    "country": "IN",
    "currency": "INR",
    "device": Platform.OS,
    "email": "[email protected]",
    "hostUrl": "https://test.paymentz.com/transaction/Checkout",
    "memberId": "13219",
    "merchantTransactionId": merchantTransactionId,
    "orderDescription": "TestinTransaction",
    "paymentBrand": "",
    "paymentMode": "",
    "phone": "1234567890",
    "postCode": "400064",
    "state": "MH",
    "street": "Malad",
    "telnocc": "+91",
    "terminalId": "",
    "toType": "paymentz"
  }
  
          <TouchableOpacity style={{ width: "100%", padding: 10, backgroundColor: '#1488CC' }} onPress={() => {
            PaymentzCheckoutKit.initPayment(requestParameters, "YOUR SECRET KEY HERE").then((data) => {
              // handle success
              alert(data.resultDescription)
              console.log(data)

            }).catch((error) => {
              //handle failed
              alert(error.resultDescription)
              console.log(error)
            })
          }}>
            <Text style={{ color: 'white', alignSelf: 'center' }}>Pay</Text>
          </TouchableOpacity>

Contributing

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

License

react-native-pz-checkout-kit is Copyright (c) 2024 Paymentz Gateway Solutions Pvt. Ltd. It is distributed under the MIT License.


We ♥ open source software! See our other supported plugins / SDKs or contact us to help you with integrations.