Created
September 13, 2019 18:49
-
-
Save thiagosouza/edc17daf88cc880049651f9060a2e9d2 to your computer and use it in GitHub Desktop.
Swipe - node.js sdk - initialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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