New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

2co-react

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

2co-react

React stateful component to connect to 2CO api and generate authorization token

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

2Checkout payment gateway and react

React stateful component with or without credit form that connect to 2CO api and generate client token

Getting Started

2Checkout payment gateway need a token to create and charge orders. This package will create a token for you.

Using this token, you will need to send your order and customer info to 2Checkout to make the charge.

This can be done by 2Checkout API or by 2Checkout-Node.

I recommend using 2Checkout-Node along with this package to generate token and send it to 2Checkout-Node to create the charge.

Installing & Usage

A step by step series of examples that tell you how to get a token:

Install:
npm i 2co-react

or

yarn add 2co-react
Usage:

Importing:

import TCO from '2co-react';

This is the only component you need to add:

        <TCO
          sellerId="xxxxx"
          publishableKey="xxxxx"
          sandbox
          showForm
          showModal
          showLoading
          returnToken={this.returnToken}
        />
Props Options:
TCO PropVALUEEffect
sellerIdselled id from 2checkout account-
publishableKeypublishable key from 2checkout account-
sandboxtrue or falsegenerate a sandbox or production token
showFormtrue or falseshow cedit card form
showModaltrue or falseshow credit card form on modal or on page
showLoadingtrue or falseshow loading bar while waiting for response back
returnTokenfunctionfunction that will recive one argument as the token string

Authors

  • Matan Schatzman - Email

License

This project is licensed under the MIT License

Keywords

FAQs

Package last updated on 23 Nov 2018

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc