klickl-express-crypto-plugin
v1.0.6
Published
Klickl Quick Buy Plugin for SDK
Downloads
2
Readme
KLICKL SDK for Buy Crypto Coins
Installation
npm i klickl-express-crypto-plugin
Browser
<div id="klickl-plugin-sdk"></div>
Instantiation
import * as KlicklPlugin from "klickl-express-crypto-plugin";
const KP = new KlicklPlugin.default({
env: "sandbox / product",
api_key: 'Your API Key',
target: '#klickl-plugin-sdk',
language: 'en',
user_token: 'Your Customer Token',
show_order_entry: true,
redirect_url: 'Payment success redirect url'
});
KP.init();
Params
env
:Environments, Optional values: sandbox、product.required
api_key
: API Keyrequired
target
: specify the DOM node to renderrequired
language
: language, defaulten
, optionaluser_token
: business system token, optionalshow_order_entry
: whether to show order entry button in the plugin, defaultfalse
, optionalredirect_url
: the address of the page to jump back to after successful payment, usually your order page,required
Webhook
KP.on('KP.LOGIN', () => {})
.on('KP.FORMS_CHANGE', (res) => {})
.on('KP.SUBMIT', (res) => {})
.on('KP.SECURITY_CHECK', (res) => {})
.on('KP.SUCCESS', (res) => {})
.on('KP.FAILED', (res) => {})
.on('KP.ORDER_ONCLICK', () => {})