· 6 years ago · Sep 29, 2019, 10:52 AM
1// ES2015 / TypeScript
2import * as Swipe from '@swp/swipe-sdk'
3
4// or via CommonJS
5// const Swipe = require('@swp/swipe-sdk')
6
7// initializes on production environment
8const swp = Swipe.init({
9 apiKey: "your api key",
10 secret: "your secret key",
11 language: Swipe.languages.PT_BR,
12})
13// initializes on sandbox environment
14const swp = Swipe.init({
15 apiKey: "your api key",
16 secret: "your secret key",
17 sandbox: true,
18 language: Swipe.languages.PT_BR,
19})