This is a very simple example of integrating Two Tap on a desktop website. It uses nodejs as the backend server.
You don't have to use this component. Feel free to embed Two Tap directly inside your existing platform (rails/django/anything).
- git clone this repository
- npm install
- edit app.js and add your own Two Tap PUBLIC_TOKEN and PRIVATE_TOKEN
- node app.js and visit http://localhost:2500
When the shopper confirms the purchase a callback is sent to this server. Because the callback is server-side this nodejs instance must be web accessible in order for it to work.
- app.js (set up a PUBLIC_TOKEN, PRIVATE_TOKEN)
- views/integration_iframe.ejs (this is called to startup the Two Tap HTML5 interface, you will see how to pass different variables)
- views/integration.ejs / integration.css (some UI suggestions)
- routes/integrations.js / purchaseConfirmCallback method
Write to us at [email protected].