Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
npm i -s crypttp
Signup at dashboard https://crypttp.com/dashboard
And copy merchant id
Add crypttp
module to your project
const Crypttp = require('crypttp')
const crypttp = new Crypttp()
With ES6
import Crypttp from 'crypttp';
const crypttp = new Crypttp()
in Browser
<script src="https://crypttp.com/sdk/js/index.min.js"></script>
/**
* @param {string} type 0 - for navigation, 1 - for invoice, 2 for transfer to specified address (not from db)
* @param {string} merchant_id id which you can find at console.crypttp.com
* @param {object} to object 'currency':'address' of wallets for each currency, where transfer should be sent. Used for type:2
* @param {string} country_currency object with details of transaction
* @param {string} currency only fiat currency
* @param {string} amount amount to charge in native currency numeration
* @param {string} payload any extra data that you want to send with cryptocurrency transaction
* @param {string} memo a special tag for specific blockchains
* @param {string} onsuccess url where to redirect user after checkout complete (can be deeplink)
* @param {string} onerror url where to redirect user if checkout failed (can be deeplink)
*/
const data = {
type: '2',
merchant_id: 'example_id',
to: {
BTC:'btcaddress1234'
},
country_currency: 'USD',
amount: '100', // note that amount will be passed in USD
onsuccess: 'https://example.com/order_paid', // you also can parse deeplink here
onerror: 'https://example.com/order_failed' // you also can parse deeplink here
}
crypttp.pay(data)
Crypttp will convert automatically convert 100 USD to cryptos
All transaction detailes will be shared with wallets
When transaction will be successfully made wallet will route back user to the onsuccess
or onerror
link
If you will use api on the server side it will return string (URL).
Redirect user to that URL or set it as href
attribute to redirect user on click.
FAQs
Module to call APIs of crypttp powered by alemey
The npm package crypttp receives a total of 4 weekly downloads. As such, crypttp popularity was classified as not popular.
We found that crypttp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.