DIY Vending Machine with Cortana Skills and Bot Framework - Internet of Things

DIY Vending Machine with Cortana Skills and Bot Framework



STORY

Cortana Vending Bot
Turn your Raspberry Pi into a vending machine to accept credit card payments using Bot Framework and Cortana Skills. Checkout this video.

Bot Framework
The Bot Framework is a platform to build, connect, test and deploy intelligent bots. You can use .NET, Node.JS and REST to start building bots with Bot Framework.

Here's the link to learn more about the Bot SDK.

Check out my tutorial on Getting Started with Cortana Skills, Bot Framework and Raspberry Pi. It's a gentle introduction and step by step tutorial to run Bot Framework on Raspberry Pi.

Request Payment
Learning more about Bot Framework, I found out that you can easily request for payment. Set up your bot to allow users to purchase items, then it can request payment by including a special type of button within a rich card. Here's the article:

There are few prerequisites before requesting for payment using Bot Builder SDK.

1. Register your Bot with Bot Framework

2. Setup a merchant account via Stripe

I followed the instructions outlined here. It's straightforward and easy to follow.

If you watch the video, there are 3 parts of the payment process. First, the bot sends payment request (once you click the buy button). Second, the user will have to sign in to their Microsoft Account and provide credit card information; if the bot requested for shipping and contact information, it will prompt as well. After the user completes the payment, the bot processes the callback that it receives and sends the command to the candy dispenser.

Our bot must implement the First Step and Last Step of this process; Second step takes place outside the context of your bot. So, you don't receive any credit card information, Microsoft Wallet handles all that for you.

Raspberry Pi
Running the Bot Builder SDK on Raspberry Pi is easy. You need to install NodeJS. There's an NPM package for the Bot Builder SDK.

Here's a sample application that Microsoft provides that you can test out on Raspberry Pi.

https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/sample-payments
You have to open a port outside your network so Cortana and Bot Framework can reach it. The easiest way to accomplish this is to use Ngrok.

Here are steps to configure it. Ngrok offers the ability to create a secure tunnel to your localhost environment. You have to install Ngrok.

  Downloand File

Douploads |  uplod

Downloand |  Downloand 

DIY Vending Machine with Cortana Skills and Bot Framework  DIY Vending Machine with Cortana Skills and Bot Framework Reviewed by XXX on สิงหาคม 07, 2560 Rating: 5

ไม่มีความคิดเห็น