Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crypttp-react

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypttp-react

  • 0.1.13
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Crypttp-react

Installation

1. Download dependency in project directory

npm i -s crypttp-react

2.

Signup at dashboard https://crypttp.com/dashboard

And copy merchant id

Usage

1. Add crypttp to imports of

/*
 here your imports goes
*/
import Crypttp from 'crypttp-react';

/*
 if you using next.js for Server Side Rendering
*/
const Crypttp = dynamic(import('crypttp-react'), { ssr: false })

2. Add component to your cart

<crypttp type="type"
    merchant_id="merchant_id"
    country_currency="country_currency"
    currency="currency"
    amount="amount"
    payload="payload"
    memo="memo"
    onsuccess="onsuccess"
    onerror="onerror" />

3. Configure display

Default button looks like this:

You are able to configure button by passing additional parametres

<crypttp
    buttonText="Custom text" <!-- This text will be displayed on button -->
    buttonColor="#000000"  <!-- Background color of button. If you set light colors we autoconvert font color to dark -->
    buttonWidth="300px" <!-- Width of the button to achive perfect fit on your website -->
    ...
    payment params
    />
------

4. All available params

TypeNameOptional \ RequiredDiscription
stringbuttonTextoptionalThis text will be displayed on button
stringbuttonColoroptionalBackground color of button.
stringbuttonWidthoptionalWidth of the button to achive perfect fit on your website
stringtyperequired0 - if you are CRYPTO ACUQRING, track transactions yourself, you keep wallet address of merchant. 1 - if you are MERCHANT and want charge user. We will create wallet address for you to accept cryptos. 2 - if you want to specify wallet addresses where user will send crypto
stringmerchant_idrequiredid which you can find at crypttp.com/dashboard
stringcountry_currencyrequiredcurrency of your client. Can't vary for each client.
objecttooptionalpass wallet addresses as { 'currency ticket': 'wallet address' } if you use type: 2
stringcurrencyoptionalpass it only if you know which crypto you want to charge from client
stringamountrequiredamount to charge in native currency numeration
stringpayloadoptionalany extra data that you want to send with cryptocurrency transaction
stringmemooptionala special tag for specific blockchains
stringonsuccessoptionalurl (without https:// !!!) where to redirect user after checkout complete
stringonerroroptionalurl (without https:// !!!) where to redirect user if checkout failed

FAQs

Package last updated on 18 Jan 2020

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