Xport Digital
1. INTRODUCTION2. NON APPROVED MERCHANT3. APPROVED MERCHANT4. DOCKER INTEGRATION5. EMBEDDED CRYPTO TRANSFER WIDGETReactJsAngularHTML/JS projects6. EMBEDDED NON CRYPTO TRANSFER WIDGET7. API CALLS

EMBEDDED CRYPTO TRANSFER WIDGET

ReactJs

<head>
<script src="./cryptoWidget.js"></script>
</head>

Import link to your index.html, src link may differ.

In your component.

componentDidMount(){
this.start();
}
start= ()=>{
var cryptoWidget = new window.CryptoWidgetConnect(
'bca44c88-0445-4ab0-ab47-1d162a587d46',
{
env: 'staging',
xportUser: "#",
xportPassword: "#",
symbols: ['USDT', 'ETH', 'TUSD', 'DAI', 'BNB', 'LINK'],
markupFee: 0.02,
logo: "#",
title: "#"
});
cryptoWidget.startCryptoWidget()
cryptoWidget.on('closeCryptoWidget', () => {})
}

Initialize the widget and pass your credentials.

<button id="cryptoWidgetConnect">
Start crypto Widget
</button>

Place a button with the given id.

Angular

<head>
<script src="assets/cryptoWidget.js"></script>
</head>

Import link to your index.html, src link may differ.

In your component.ts

import { Component, OnInit } from "@angular/core";
declare var CryptoWidgetConnect: any;

Initialize crypto widget beneath the import statement.

Initialize the widget

var cryptoWidget = new CryptoWidgetConnect(
'bca44c88-0445-4ab0-ab47-1d162a587d46',
{
env: 'staging'
xportUser: "#",
xportPassword: "#",
symbols: ['USDT', 'ETH', 'TUSD', 'DAI', 'BNB', 'LINK'],
markupFee: 0.02,
logo: "#",
title: "#",
});
cryptoWidget.startCryptoWidget(
cryptoWidget.on('closeCryptoWidget', () => {})

Add button to your component.html file

<button id="cryptoWidgetConnect">
Start crypto widget
</button>

HTML/JS projects

Import the script file

<head>
<script src="./cryptoWidget.js"></script>
</head>

Place the following code inside the body

<button id="cryptoWidgetConnect">Connect with Cryptowidget</button>
<script>
var cryptoWidget = new CryptoWidgetConnect(
'bca44c88-0445-4ab0-ab47-1d162a587d46',
{
env: 'staging',
xportUser: "#",
xportPassword: "#",
symbols: ['USDT', 'ETH', 'TUSD', 'DAI', 'BNB', 'LINK'],
markupFee: 0.02,
logo: "#",
title: "#S"
},
);
cryptoWidget.startCryptoWidget()
cryptoWidget.on('closeCryptoWidget', () => {})
</script>