Skip to content

newbotjs/chatbot-example-stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot Example : Buy a movie

Conversation

After click on Buy button

Webview

Prerequisites

  1. Create Stripe account. Get public and pirvate keys
  2. Create The Movie DB account. Get private key (settings > API)
  3. Create NewBot Cloud account. Get only public key (settings > API)

NewBot must be installed (npm install -g newbot-cli)

Installation

git clone git@github.com:newbotjs/chatbot-example-stripe.git
cd chatbot-example-stripe
npm install

Configuration

In webviews/js/config.js :

const  NEWBOT_PUBLIC_KEY  =  '<Your NewBot Cloud Public Key>'
const  STRIPE_PUBLIC_KEY  =  '<Your Stripe Public Key>'

Start

export MOVIE_DB_KEY=<Your The Movie Db Private Key>
export STRIPE_KEY=<Your Stripe Private Key>
newbot serve

Open Bot Framework Emulator and test with a sentence : Buy a movie

Deploy on NewBot Cloud

  1. Go to NewBot Cloud account
  2. Create Environment variables
    1. Go to Build > Data > Add
    2. Put a name (Movies for example) and select Environment variables. Click on validate
    3. Click on Add button to add data
    4. Add MOVIE_DB_KEY in Key and your The Movie Db Private Key in Value
    5. Add new data and add STRIPE_KEY in Key and your Stripe Private Key in Value
  3. In your project, deploy with this command : newbot deploy

About

The user can buy a movie with Stripe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published