1.0.2 • Published 1 year ago

@tap-payments/browser-info v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

browser-information

Sample SDK to retrieve browser information using javascript

Usage

import { BrowserInfo } from "@tap-payments/browser-info"

new BrowserInfo({
  app: {
    name: "My App",
    language: "en"
  },
  credentials: {
    mdn: "123456789",
    pk: "123456789"
  },
  encrypt: (key, value) => {
    // encryptString(value) or return value
  },
  location: {
    ip: "",
    latitude: "",
    longitude: ""
  }
}).get()

Properties

PropertyTypeDescription
appobjectApplication information
app.namestringApplication name
app.languagestringApplication language
credentialsobjectCredentials
credentials.mdnstringMerchant origin
credentials.pkstringPublic key
encryptfuncEncryption function or you can return the value as it's
locationobjectLocation information
location.ipstringIP address
location.latstringLatitude
location.longstringLongitude