Skip to content

Instantly share code, notes, and snippets.

@thiagosouza
Last active September 13, 2019 18:05
Show Gist options
  • Save thiagosouza/cdbeec0937154224c90b3f64198d06f3 to your computer and use it in GitHub Desktop.
Save thiagosouza/cdbeec0937154224c90b3f64198d06f3 to your computer and use it in GitHub Desktop.
Swipe - node.js sdk - initialization
// ES2015 / TypeScript
import * as Swipe from '@swp/swipe-sdk'
// or via CommonJS
// const Swipe = require('@swp/swipe-sdk')
// initializes on production environment
const swp = Swipe.init({
apiKey: "your api key",
secret: "your secret key",
language: Swipe.languages.PT_BR,
})
// initializes on sandbox environment
const swp = Swipe.init({
apiKey: "your api key",
secret: "your secret key",
sandbox: true,
language: Swipe.languages.PT_BR,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment