Socket
Book a DemoInstallSign in
Socket

react-slope-js

Package Overview
Dependencies
Maintainers
4
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-slope-js

Slope modal ui component

3.0.0-rc.3
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

How to Use

Step 1: Install the latest package

npm install react-slope-js

Step 2: Import SlopeCheckout and pass in props as seen below

import SlopeCheckout from 'react-slope-js';

const checkoutInfo = {
  buyer: {
    first_name: "first_name",
    last_name: "last_name",
    email: "buyer@email.com",
    phone_number: "+18282822828",
    business_type: 1,
    business_name: "name of the bussiness",
    address: {
      line_1: "address line 1",
      line_2: "address line 2",
      city: "sf",
      state: "CA",
      country: "USA",
      zip_code: "99999"
    },
  },
  items: [
    {
      id: "12",
      name: "item_name",
      description: "item description",
      count: 1,
      price: 12,
      currency: 'usd'
    }
  ],
  loan_price: {
    amount: 123,
    currency: "usd"
  }
  // optional metadata field (JSON)
  metadata: {
    someKey: "someVal"
  }
}

<SlopeCheckout
  checkoutInfo={checkoutInfo}
  onSuccess={success}
  onFailure={failure}
  apiKey={API_KEY}
>
  Pay with Slope
</SlopeCheckout>

const success = (loanInfo) => {
  console.log('on Success: ', loanInfo);
}

const onFailure = (errorMessage) => {
  console.log('onFailure: ', errorMessage)
}

  • Child View under SlopeCheckout can be any react view
  • The modal will be shown on click of that child view.
  • Dev & Prod keys are required for the modal to work correctly, it'll be provided by slope.so

slopeDemo1 5 3

Keywords

slope

FAQs

Package last updated on 31 Oct 2021

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.