Skip to content

Instantly share code, notes, and snippets.

@thiagosouza
Created September 13, 2019 18:49
Show Gist options
  • Save thiagosouza/edc17daf88cc880049651f9060a2e9d2 to your computer and use it in GitHub Desktop.
Save thiagosouza/edc17daf88cc880049651f9060a2e9d2 to your computer and use it in GitHub Desktop.
Swipe - node.js sdk - initialization
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<!--<link rel="stylesheet" href="styles.css">-->
</head>
<body>
<h1>Hello world!</h1>
<!--<script src="script.js"></script>-->
</body>
</html>
// 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