@tap-payments/browser-info
v1.0.2
Published
it's a library to get all required headers with our formatting
Downloads
2,603
Maintainers
Keywords
Readme
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
| Property | Type | Description |
| --------------- | -------- | ------------------------------------------------------- |
| app | object
| Application information |
| app.name | string
| Application name |
| app.language | string
| Application language |
| credentials | object
| Credentials |
| credentials.mdn | string
| Merchant origin |
| credentials.pk | string
| Public key |
| encrypt | func
| Encryption function or you can return the value as it's |
| location | object
| Location information |
| location.ip | string
| IP address |
| location.lat | string
| Latitude |
| location.long | string
| Longitude |