New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@chainplatform/paypal

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainplatform/paypal

The library allows you to use Paypal Payment with react-native without ejecting support both react-native and react-native-web.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
0
Created
Source

React Native Paypal Payment and React Native Web Paypal Payment

The library allows you to use Paypal Payment with react-native without ejecting support both react-native and react-native-web.

Current npm package version. PRs welcome! Follow @doansan

Description

The library allows you to use Paypal Checkout with react-native without ejecting. You can use it with both server-side implementations and client-side implementations.

Prequisites

  • This library relies on React Native Webview. Please follow this guide to install in your project first.

Installation

  • Ensure you've completed the setps in prequisites.

  • Install package via npm or yarn:

npm install --save @chainplatform/paypal OR yarn add @chainplatform/paypal

  • If your project use react-native-web to build website:

npm install --save @chainplatform/react-native-web-webview OR yarn add @chainplatform/react-native-web-webview

Then setup by guide at: https://github.com/ChainPlatform/react-native-web-webview#readme

Usage

  • Import in your project
import PaypalPayment from '@chainplatform/paypal';
    <PaypalPayment
        theme={"light"}
        order_id={datas.payment_infos.datas.order_id}
        sandbox_client_id={datas.payment_infos.datas.sandbox_client_id}
        production_client_id={datas.payment_infos.datas.production_client_id}
        sandbox_environment={datas.payment_infos.datas.sandbox_environment}
        paymentResult={(datas) => {
            console.log("paymentResult ", datas);
        }}
    />

Component props

  • theme (String) - theme dark or light
  • order_id (String) - order_id.
  • sandbox_client_id (String) - Paypal sandbox client id of your project.
  • production_client_id (String) - Paypal production client id of your project.
  • sandbox_environment (String) - Paypal environment.
  • paymentResult (?Function) - Called upon calback of the checkout session
  • Support full Webview props

Contributing

Pull requests are highly appreciated! For major changes, please open an issue first to discuss what you would like to change.

  • Other packages for react native and react native web: ChainPlatform

Keywords

react

FAQs

Package last updated on 22 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts