0?n.maxBatchSizeInBytes:1e6,n.maxBatchInterval=isNaN(n.maxBatchInterval)?15e3:n.maxBatchInterval,n.enableDebug=t.Util.stringToBoolOrDefault(n.enableDebug),n.disableExceptionTracking=n.disableExceptionTracking!==undefined&&n.disableExceptionTracking!==null?t.Util.stringToBoolOrDefault(n.disableExceptionTracking):!1,n.disableTelemetry=t.Util.stringToBoolOrDefault(n.disableTelemetry),n.verboseLogging=t.Util.stringToBoolOrDefault(n.verboseLogging),n.emitLineDelimitedJson=t.Util.stringToBoolOrDefault(n.emitLineDelimitedJson),n.diagnosticLogInterval=n.diagnosticLogInterval||1e4,n.autoTrackPageVisitTime=t.Util.stringToBoolOrDefault(n.autoTrackPageVisitTime),(isNaN(n.samplingPercentage)||n.samplingPercentage<=0||n.samplingPercentage>=100)&&(n.samplingPercentage=100),n.disableAjaxTracking=n.disableAjaxTracking!==undefined&&n.disableAjaxTracking!==null?t.Util.stringToBoolOrDefault(n.disableAjaxTracking):!1,n.maxAjaxCallsPerView=isNaN(n.maxAjaxCallsPerView)?500:n.maxAjaxCallsPerView,n.disableCorrelationHeaders=n.disableCorrelationHeaders!==undefined&&n.disableCorrelationHeaders!==null?t.Util.stringToBoolOrDefault(n.disableCorrelationHeaders):!0,n.disableFlushOnBeforeUnload=n.disableFlushOnBeforeUnload!==undefined&&n.disableFlushOnBeforeUnload!==null?t.Util.stringToBoolOrDefault(n.disableFlushOnBeforeUnload):!1,n.enableSessionStorageBuffer=n.enableSessionStorageBuffer!==undefined&&n.enableSessionStorageBuffer!==null?t.Util.stringToBoolOrDefault(n.enableSessionStorageBuffer):!1,n},i}();t.Initialization=i})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(){"use strict";var r,u;try{if(typeof window!="undefined"&&typeof JSON!="undefined")if(r="appInsights",window[r]===undefined)n.ApplicationInsights.AppInsights.defaultConfig=n.ApplicationInsights.Initialization.getDefaultConfig();else{var f=window[r]||{},t=new n.ApplicationInsights.Initialization(f),i=t.loadAppInsights();for(u in i)f[u]=i[u];t.emptyQueue();t.pollInteralLogs(i);t.addHousekeepingBeforeUnload(i)}}catch(e){n.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+e.message)}})(t=n.ApplicationInsights||(n.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(n.PageViewData);n.AjaxCallData=t}(AI||(AI={})),function(n){"use strict";var t=function(n){function t(){n.call(this);this.ver=2;this.properties={};this.measurements={};n.call(this)}return __extends(t,n),t}(Microsoft.Telemetry.Domain);n.RequestData=t}(AI||(AI={})),function(n){"use strict";var t=function(t){function i(){t.call(this);this.ver=2;this.state=n.SessionState.Start;t.call(this)}return __extends(i,t),i}(Microsoft.Telemetry.Domain);n.SessionStateData=t}(AI||(AI={})),function(n){"use strict";(function(n){n[n.Pass=0]="Pass";n[n.Fail=1]="Fail"})(n.TestResult||(n.TestResult={}));var t=n.TestResult}(AI||(AI={}))
\ No newline at end of file
diff --git a/CSharp/capability-botToWeb/CancelPayFlow.png b/CSharp/capability-botToWeb/CancelPayFlow.png
deleted file mode 100644
index 36fdc166a4..0000000000
Binary files a/CSharp/capability-botToWeb/CancelPayFlow.png and /dev/null differ
diff --git a/CSharp/capability-botToWeb/CancelPayFlowPayPal.png b/CSharp/capability-botToWeb/CancelPayFlowPayPal.png
deleted file mode 100644
index a14f0f1a51..0000000000
Binary files a/CSharp/capability-botToWeb/CancelPayFlowPayPal.png and /dev/null differ
diff --git a/CSharp/capability-botToWeb/LICENSE b/CSharp/capability-botToWeb/LICENSE
deleted file mode 100644
index a28827c2b8..0000000000
--- a/CSharp/capability-botToWeb/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Microsoft
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/CSharp/capability-botToWeb/PaypalBot.sln b/CSharp/capability-botToWeb/PaypalBot.sln
deleted file mode 100644
index 3260f4952b..0000000000
--- a/CSharp/capability-botToWeb/PaypalBot.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot", "Bot\Bot.csproj", "{A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- CodeAnalysis|Any CPU = CodeAnalysis|Any CPU
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.CodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU
- {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.CodeAnalysis|Any CPU.Build.0 = Release|Any CPU
- {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/CSharp/capability-botToWeb/Readme.md b/CSharp/capability-botToWeb/Readme.md
deleted file mode 100644
index 9ec4304c50..0000000000
--- a/CSharp/capability-botToWeb/Readme.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# PayPal Bot Sample
-
-A sample bot that forwards the user to complete a PayPal payment and then resumes the conversation. This sample is a simple starting point for more complex PayPal transactions through bots. By redirecting to PayPal and resuming once done we ensure the bot does not handle the financial transaction itself and just facilitates it.
-
-### Prerequisites
-
-The minimum prerequisites to run this sample are:
-* The latest update of Visual Studio 2015. You can download the community version [here](http://www.visualstudio.com) for free.
-* The Bot Framework Emulator. To install the Bot Framework Emulator, download it from [here](https://emulator.botframework.com/). Please refer to [this documentation article](https://github.com/microsoft/botframework-emulator/wiki/Getting-Started) to know more about the Bot Framework Emulator.
-* [A PayPal developer account](https://developer.paypal.com/) with:
- * A test Business (Merchant) account to be the test seller account and
- * A test Personal account to use as the test buyer making a payment. Make sure to include funds in the test Personal account when creating it so you can use those for the test payments.
-* A [PayPal REST API app](https://developer.paypal.com/developer/applications) associated with the Business (Merchant) account mentioned above. You won't need a Webhook configured in this PayPal app. Take note of the Client ID, App ID, and Secret when creating the app.
-
-### Highlights
-
-The bot instructs the user to click a link to perform a payment on PayPal and points PayPal's completion Url back to a new Controller within the bot (`PaymentController`).
-
-When the request is sent to `PaymentController`, the bot resumes the conversation using a stored ResumptionCookie for the user on the channel where the payment flow was initiated. It pulls relevant information from the PayPal response to know whether or not payment was successful at PayPal before completing the payment.
-
-The code uses the [PayPal .NET SDK](https://www.nuget.org/packages/paypal). Before running:
-* Update the **PayPal** section in `Web.config` with the values from the PayPal REST API app you created
-* Update the **MS_WebHookReceiverSecret_PayPal** setting in the `appSettings` section with the same value as clientSecret from the **PayPal** section
-
-### Examples
-
-After starting a conversation with the bot, it'll ask the amount you want to pay. Once a numeric amount is provided, it'll build the link for the user to follow to complete the transaction on the PayPal website.
-
-#### Success Flow
-
-On the PayPal website if you log in with the test Personal account you created as part of the pre-requisites you'll be able to complete the payment:
-![Success Pay Flow PayPal](SuccessPayFlowPayPal.png)
-
-And here is the conversation in the Bot Emulator for the successful transaction:
-![Success Pay Flow Bot](SuccessPayFlow.png)
-
-#### Cancellation Flow
-
-On the PayPal website if the user decides to cancel the transaction it will not complete the payment:
-![Cancellation Pay Flow PayPal](CancelPayFlowPayPal.png)
-
-And here is the conversation in the Bot Emulator for the cancelled transaction:
-![Cancellation Pay Flow Bot](CancelPayFlow.png)
-
-### Code of Conduct
-
-This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
-For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
-contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
-
-### Copyright and license
-
-Code released under [the MIT license](LICENSE)
diff --git a/CSharp/capability-botToWeb/SuccessPayFlow.png b/CSharp/capability-botToWeb/SuccessPayFlow.png
deleted file mode 100644
index 4c67c66221..0000000000
Binary files a/CSharp/capability-botToWeb/SuccessPayFlow.png and /dev/null differ
diff --git a/CSharp/capability-botToWeb/SuccessPayFlowPayPal.png b/CSharp/capability-botToWeb/SuccessPayFlowPayPal.png
deleted file mode 100644
index 03a30019e8..0000000000
Binary files a/CSharp/capability-botToWeb/SuccessPayFlowPayPal.png and /dev/null differ
diff --git a/Node/capability-botToWeb/2016-10-31-Payments-with-Bot-Framework.md b/Node/capability-botToWeb/2016-10-31-Payments-with-Bot-Framework.md
deleted file mode 100644
index e4a24af4ff..0000000000
--- a/Node/capability-botToWeb/2016-10-31-Payments-with-Bot-Framework.md
+++ /dev/null
@@ -1,401 +0,0 @@
----
-published: true
-layout: post
-title: "Integrating Payments with Bots"
-author: "Bhargav Nookala"
-author-link: "http://bhargavsbox.com"
-author-image: "images/authorsthumbnail/BhargavNookala.jpg"
-author-twitter: "http://twitter.com/bhargav"
-image: "images/2016-10-31-Payments-with-Bot-Framework/title.png"
-thumbnail: "images/2016-10-31-Payments-with-Bot-Framework/title_thumbnail.png"
-date: 2016-10-31 10:00:00
-tags: bots Microsoft framework node SDK PayPal
-color: "blue"
-excerpt: "Integrating payment service providers with the Microsoft Bot Framework."
-coderesource: "https://github.com/bnookala/node-paymentbot"
-attributions:
- - text: 'PayPal Payments API documentation'
- url: 'https://developer.paypal.com/docs/api/payments/'
- - text: 'PayPal Node SDK'
- url: 'https://github.com/paypal/PayPal-node-SDK'
-
----
-
-# Background
-
-At a recent collaboration with a customer, we learned about a few integrations they had wanted to build for Bots running with the Microsoft Bot Framework. One such integration was with a payments service provider, like PayPal. We had created an example of this integration with the C# SDK for Bot Framework, but no such example existed for the Node SDK. As such, I'd like to demonstrate how straightforward it is to build a PayPal integration for bots made using Bot Framework's Node SDK.
-
-## Set up an application
-
-You will need to register the bot application with PayPal to generate the requisite keys to access the Paypal APIs. After logging into PayPal, [go to the developer center page to create an application](https://developer.paypal.com/developer/applications/create). Copy the **Client ID** and the **Client Secret** (the **Client Secret** will be hidden from you until you select 'Show' with your cursor).
-
-We additionally need to [create a test user](https://developer.paypal.com/developer/accounts/create) to use with the PayPal sandbox. When testing in the **sandbox** environment, you can use this test account, which doesn't require adding a credit card or funding the account.
-
-## Setup Node and grab the sample
-
-The following steps assume you have Node.js, npm, and a Bot Framework Emulator installed on your computer. To install Node and npm, visit [the Node download page](https://nodejs.org/en/download/) and select 'Current.' At the time of writing, the current iteration of Node is version 6.7.0, but any version that is 4.x or above should work. We do not recommend lower versions as the semantics of some keywords have changed between versions.
-
-The cross platform Bot Framework Emulator is [available to download here](https://docs.botframework.com/en-us/tools/bot-framework-emulator/).
-
-From here on, we'll reference and discuss the code available [on Github](https://github.com/bnookala/node-paymentbot). Using `git`, clone the repository onto your computer in your terminal of choice: `git clone https://github.com/bnookala/node-paymentbot`, `cd` into this directory and run `npm install` to download the module dependencies.
-
-## Running the sample
-
-1. `cd` into the `node-paymentbot` directory
-2. `npm install` to install the module dependencies
-3. Set the `PAYPAL_CLIENT_ID`, `PAYPAL_CLIENT_SECRET`, and `PAYPAL_CLIENT_MODE` environment variables in your terminal to the copied **Client ID** from PayPal, the copied **Client Secret** from PayPal, and **"sandbox"** respectively. You can optionally set the `PORT` environment variable to customize which port the application is bound to, but it will default to 3978.
-4. run `node app.js`, note the URL that it writes the console, i.e., `restify listening to http://[::]:3978`
-5. To configure the Bot Framework Emulator, start the emulator application, and enter the bot messaging endpoint. For a locally running bot it should be: `http://localhost:3978/api/messages`
-6. Start interacting with the bot!
-
-# Building a payment flow from scratch
-
-PayPal offers many APIs and products for creating and executing payments between users and businesses. To keep our integration straightforward, we'll focus on one relatively simple flow, which involves user approval of payment before we're able to execute and receive a payment. The full flow is described [in PayPal's documentation](https://developer.paypal.com/docs/integration/web/accept-paypal-payment/) in detail, but we'll be using [PayPal's Node SDK](https://github.com/paypal/PayPal-node-SDK) to remove some of the boilerplate in creating and executing the payments.
-
-
-## Integrating PayPal into a Bot
-
-To use the PayPal Node SDK, we must require it as a module, and configure it with the **Client ID** and **Client Secret** variables we generated from the PayPal dashboard earlier. PayPal also provides a sandbox environment for testing transactions. We'll use this environment here to test payments. In practice, when deploying to a production service, you'll likely want to use different credentials. One popular way to achieve this bucketed approach to deployment is through the underlying system's environment variables. This way, your code can be environment-agnostic, and you won't need to keep your **Client ID** and **Client Secret** variables in your code. When configured, the `paypal` module will be able to create and execute payments and transactions:
-
-
-
-
-To set up our bot, we'll need to create an instance of a `ChatConnector` and an instance of a `UniversalBot`. We'll also need to create an HTTP server, for the `ChatConnector` instance to listen on. A `ChatConnector` allows our Bot to listen and respond on multiple types of messaging channels. Bot Framework currently supports numerous [popular messaging channels](https://docs.botframework.com/en-us/faq/#what-channels-does-the-bot-framework-currently-support), and is consistently adding more. We'll use the `UniversalBot` instance to define our bot's logic (i.e. how it should respond and react when a user performs an action):
-
-
-
-
-This setup is great, but our bot doesn't do anything yet; we haven't defined any logic for it. Let's step back and define a use case for this bot: a city government charges a resident for their parking fine and the resident logs on to complete that payment. This example is straightforward enough that we can build it using a single dialog combined with a waterfalled conversation. For more background on dialogs and conversation, please [read the related section of the Bot Framework documentation](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#collecting-input). A stubbed out example is as follows:
-
-
-
-
-Now, our bot will be able to respond to conversation. Let's test it in the bot framework emulator:
-
-![UI of Microsoft Bot Framework Channel Emulator. Bot tells user they have one outstanding fine for a parking fine violation, and asks 'what would you like to do?' with option to pay fine or cancel.]({{site.baseurl}}/images/2016-10-31-Payments-with-Bot-Framework/emulator.png)
-
-Our bot can now recognize that we want to pay our fine, but it does not yet know how to process that fine. [Line 24](https://gist.github.com/bnookala/a8c8c352e4c6180e822655fa311aa204#file-bot_dialog_stubbing-js-L24) of the above gist describes a "TODO": creating a payment and asking the user to approve it. This point is the first step in our two-step approval/execution flow for collecting payment from a user. Let's create a function, `createAndSendPayment`, that can create the payment using the PayPal Node SDK, and provide a link that the user can go to the approve the payment. We'll use the function `paypal.payment.create` that the Paypal Node SDK offers to create this payment. The first argument to this function is a JSON object, and the second is a callback that is executed upon success or failure. The schema of the JSON object defines the payment that the user will approve, and includes the name, description, amount, and URLs that PayPal will redirect to on approval or cancellation. The full schema of the JSON object that PayPal requires for payment creation is [described in their documentation](https://developer.paypal.com/docs/api/payments/#payment_create_request). The code as follows describes a function that builds our payment JSON, and one that takes this built JSON, creates a payment and asks the user to approve it:
-
-
-
-
-The callback ([starting at Line 44](https://gist.github.com/bnookala/a8c8c352e4c6180e822655fa311aa204#file-payment_json_ex-js-L44-L59)) passed as the second parameter looks through the `payment` object received as an argument and searches for an `approval_url` property, which can be presented to the user. The user must visit this URL and approve the payment before we can continue and execute the payment. We use a Bot Framework built-in, `builder.Prompts.text`, to display the approval URL to the user.
-
-With the user having visited the URL and approved a payment, we must now execute the payment. To do that, we must create a `redirect_url` and provide that in the JSON object for payment creation. PayPal will then redirect our user to this endpoint, which will be hosted by us on the HTTP server we had set up earlier. Soon, we'll use this endpoint to perform the payment execution. Our code now has a endpoint ([lines 3 through 6](https://gist.github.com/bnookala/a8c8c352e4c6180e822655fa311aa204#file-redirect_ex-js-L3-L6)) that PayPal will redirect to:
-
-
-
-
-To execute an approved payment, we use the `paypal.payment.execute` function provided by PayPal's Node SDK. This function takes three arguments: a payment ID, a JSON blob with [a few fields describing the payment to be executed](https://developer.paypal.com/docs/api/payments/#payment_execute_request), and a callback that is run on success or fail. When PayPal redirects to our endpoint, it modifies the query parameters of the redirect URL, adding a `paymentId` and a `PayerID`. These parameters must be used to execute the payment, with `paymentId` corresponding to the first argument of `paypal.payment.execute`, and `PayerID` corresponding to a field within the JSON blob:
-
-
-
-
-We now have the full payment flow, except the very last step which involves informing the user (via the bot, and on the user's native messaging channel) that their payment has been successfully processed. Since we're no longer operating within the context of the bot, but rather within the context of the HTTP server, we'll have to get creative.
-
-We'll need to modify our code a bit and build up an `Address`, a Bot Framework model that identifies the channel and user with which a message is associated. These properties are all encoded on the `session.message` object normally, and can thus be re-encoded as query arguments in the `return_url` of the approval step. PayPal does not strip these parameters, so they get returned again when the user is redirected to the `approvalComplete` endpoint. When the payment is executed, we can pass these parameters along and create a message to be sent to the user, even in the context of the HTTP Server, without an active `session` object.
-
-
-
-
-[Line 8](https://gist.github.com/bnookala/a8c8c352e4c6180e822655fa311aa204#file-redirect_bot_message_ex-js-L8) identifies the `Address` of the message to be encoded into the `return_url`. When the payment is executed, [lines 34-35](https://gist.github.com/bnookala/a8c8c352e4c6180e822655fa311aa204#file-redirect_bot_message_ex-js-L34-L35) pull these same encoded parameters out of the query string, and pass it along to a new function, `respondToUser`, which uses the address to build up a `builder.Message`. All messages that pass through the Bot Framework are represented internally through this model. Thus, we can create a response here, and send it along to our bot at [line 53](https://gist.github.com/bnookala/a8c8c352e4c6180e822655fa311aa204#file-redirect_bot_message_ex-js-L53). Our complete interaction now looks like this:
-
-![Animated GIF of complete interaction with Microsoft Bot Framework Channel Emulator and PayPal]({{site.baseurl}}/images/2016-10-31-Payments-with-Bot-Framework/complete_flow.gif)
-
-
-## Conclusion
-
-The code highlighted above consists mostly of snippets and examples that intend to illustrate how we implemented payments with Bot Framework. A working code example is [available on GitHub](https://github.com/bnookala/node-paymentbot).
-
-Through this tutorial, I've identified a common third party service integration, PayPal, and integrated it with a Bot built on Bot Framework's Node SDK. I've also demonstrated that Bot Framework is a flexible tool for integrating conversation into your platform and can coexist with many popular existing integrations.
diff --git a/Node/capability-botToWeb/LICENSE b/Node/capability-botToWeb/LICENSE
deleted file mode 100644
index 32b2375ba4..0000000000
--- a/Node/capability-botToWeb/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2016 Bhargav Nookala
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/Node/capability-botToWeb/README.md b/Node/capability-botToWeb/README.md
deleted file mode 100644
index f2470f6073..0000000000
--- a/Node/capability-botToWeb/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# node-paymentbot
-
-![An animation that shows the paypal integration in use](complete_flow.gif)
-
-## Description
-
-A sample bot that demonstrates an integration between Bot Framework and PayPal
-
-## Setup
-
-1. Download and install a Bot Framework emulator, as this bot can be run locally: https://docs.botframework.com/en-us/tools/bot-framework-emulator/
-
-2. Create a PayPal account, and then create an application. You can do that here: https://developer.paypal.com/developer/applications/create.
-After creating the application, grab the **Client ID** and **Client Secret** from the application dashboard. These will be used to allow the bot to connect to PayPal.
-
-3. Create a PayPal sandbox test user here: https://developer.paypal.com/developer/accounts/. This is only needed if you use the PayPal "sandbox" environment to test payments.
-You can change the environment PayPal will create payments on by changing the `PAYPAL_CLIENT_MODE` environment variable to "live".
-
-4. Export these environment variables: **PAYPAL_CLIENT_MODE**, **PAYPAL_CLIENT_ID**, **PAYPAL_CLIENT_SECRET**.
-
-5. Export bot credentials into environment variables: **MICROSOFT_APP_ID**, **MICROSOFT_APP_PASSWORD** (Get them from https://dev.botframework.com)
-
-For Mac OS/Linux:
-
-```
-export PAYPAL_CLIENT_MODE="sandbox"
-PAYPAL_CLIENT_ID="YOUR CLIENT ID FROM PAYPAL"
-PAYPAL_CLIENT_SECRET="YOUR CLIENT SECRET FROM PAYPAL"
-MICROSOFT_APP_ID="YOUR BOT APP ID"
-MICROSOFT_APP_PASSWORD="YOUT BOT APP PASSWORD"
-```
-
-For Windows using PowerShell:
-
-```
-$env:PAYPAL_CLIENT_MODE = "sandbox"
-$env:PAYPAL_CLIENT_ID = "YOUR CLIENT ID FROM PAYPAL"
-$env:PAYPAL_CLIENT_SECRET = "YOUR CLIENT SECRET FROM PAYPAL"
-$env:MICROSOFT_APP_ID = "YOUR BOT APP ID"
-$env:MICROSOFT_APP_PASSWORD = "YOUT BOT APP PASSWORD"
-```
-
-## Installation
-
-Assuming that you've installed a version of Node 6:
-
-1. `git clone http://github.com/bnookala/node-paymentbot`
-2. `cd node-paymentbot`
-3. `npm install`
-4. `node app.js`
-5. Start up the emulator, verify the 'Bot URL' field is the same as the URL written to your console by the application.
-6. Done! :tada:
-
-## License
-**MIT**. See LICENSE file.
-
-## Questions?
-[Tweet at me!](https://twitter.com/bhargav)
\ No newline at end of file
diff --git a/Node/capability-botToWeb/app.js b/Node/capability-botToWeb/app.js
deleted file mode 100644
index 0fbd379ffb..0000000000
--- a/Node/capability-botToWeb/app.js
+++ /dev/null
@@ -1,238 +0,0 @@
-'use strict';
-
-// Node Requires
-const url = require('url');
-
-// Third party modules
-const restify = require('restify');
-const builder = require('botbuilder');
-const paypal = require('paypal-rest-sdk');
-
-// Configure the paypal module with a client id and client secret that you
-// generate from https://developer.paypal.com/
-paypal.configure({
- 'mode': process.env.PAYPAL_CLIENT_MODE,
- 'client_id': process.env.PAYPAL_CLIENT_ID,
- 'client_secret': process.env.PAYPAL_CLIENT_SECRET
-});
-
-// A connector connects a bot on bot framework to various messaging services that a bot
-// can talk to.
-let connector = new builder.ChatConnector({
- appId: process.env.MICROSOFT_APP_ID,
- appPassword: process.env.MICROSOFT_APP_PASSWORD
-});
-
-// A bot listens and reacts to messages that the connector picks up on.
-let bot = new builder.UniversalBot(connector, function (session, args) {
- session.beginDialog('listFines');
-});
-
-// Simple two step dialog to list 'fines' that a user has received, and allow
-// a user to 'pay' them.
-bot.dialog('listFines', [
- function (session, args) {
- console.log('List Fines Dialog');
- session.send('You have 1 outstanding fine:');
-
- session.send('Parking Fine Violation');
- builder.Prompts.choice(session, "What would you like to do?", ["Pay fine", "Cancel"]);
- },
- function (session, results, next) {
- let choice = results.response;
-
- if (choice.entity === 'Cancel') {
- return;
- }
-
- // Starts the payment flow.
- createAndSendPayment(session);
- },
-]);
-
-// We're using restify here to set up an HTTP server, and create some callbacks that Paypal will hit.
-let server = restify.createServer();
-server.use(restify.queryParser());
-
-server.listen(process.env.PORT || process.env.port || 3978, function () {
- console.log('%s listening to %s', server.name, server.url);
-});
-
-// This is a callback that Paypal hits when a user approves a transaction for completion.
-server.get('approvalComplete', function (req, res, next) {
- console.log('User approved transaction');
- executePayment(req.params);
- res.end('Executing your transaction - you may close this browser tab.');
-});
-
-// This is a callback that Paypal hits when a user cancels a transaction for completion.
-server.get('cancelPayment', function (req, res, next) {
- console.log('User cancelled transaction');
- cancelledPayment(req.params);
- res.end('Canceling your transaction - you may close this browser tab.');
-});
-
-// Messages are posted to this endpoint. We ask the connector to listen at this endpoint
-// for new messages.
-server.post('/api/messages', connector.listen());
-
-/**
- * This function creates and returns an object that is passed through to the PayPal Node SDK
- * to create a payment that a user must manually approve.
- *
- * See https://developer.paypal.com/docs/api/payments/#payment_create_request for a description of * the fields.
- */
-function createPaymentJson(returnUrl, cancelUrl) {
- return {
- "intent": "sale",
- "payer": {
- "payment_method": "paypal"
- },
- "redirect_urls": {
- "return_url": returnUrl,
- "cancel_url": cancelUrl
- },
- "transactions": [{
- "item_list": {
- "items": [{
- "name": "Fine",
- "sku": "ParkingFine",
- "price": "1.00",
- "currency": "USD",
- "quantity": 1
- }]
- },
- "amount": {
- "currency": "USD",
- "total": "1.00"
- },
- "description": "This is your fine. Please pay it :3"
- }]
- };
-}
-
-/**
- * This function creates and returns an object that is passed through to the PayPal Node SDK
- * to execute an authorized payment.
- *
- * See https://developer.paypal.com/docs/api/payments/#payment_execute_request for a description of * the fields.
- */
-function executePaymentJson(payerId) {
- return {
- "payer_id": payerId,
- "transactions": [{
- "amount": {
- "currency": "USD",
- "total": "1.00"
- }
- }]
- };
-}
-
-/**
- * Generates a URL that Paypal will redirect to on approval or cancellation
- * of the payment by the user.
- */
-function createUrl(path, address) {
- console.log('Creating URL for path: ' + path);
-
- // The address passed in is an Object that defines the context
- // of the conversation - the user, the channel, the http endpoint the bot
- // exists on, and so on. We encode this information into the return URL
- // to be parsed out by our approval completion endpoint.
- let addressEncoded = encodeURIComponent(JSON.stringify(address));
-
- // This object encodes the endpoint that PayPal redirects to when
- // a user approves the transaction.
- let urlObject = {
- protocol: 'http',
- hostname: process.env.HOST || 'localhost',
- port: process.env.PORT || process.env.port || 3978,
- pathname: path,
- query: { addressEncoded }
- }
-
- return url.format(urlObject);
-}
-
-/**
- * Creates a payment on paypal that a user must approve.
- */
-function createAndSendPayment(session) {
- console.log('Creating Payment');
-
- let returnUrl = createUrl('approvalComplete', session.message.address);
- let cancelUrl = createUrl('cancelPayment', session.message.address);
- let paymentJson = createPaymentJson(returnUrl, cancelUrl);
-
- paypal.payment.create(paymentJson, function (error, payment) {
- if (error) {
- console.log(error);
- throw error;
- } else {
- // The SDK returns a payment object when the payment is successfully created.
- // This object has a few properties, described at length here:
- // https://developer.paypal.com/docs/api/payments/#payment_create_response
- // We're looking for the 'approval_url' property, which the user must go to
- // to approve the transaction before we can actively execute the transaction.
- for (var index = 0; index < payment.links.length; index++) {
- if (payment.links[index].rel === 'approval_url') {
- session.send("Please pay your fine: " + payment.links[index].href);
- }
- }
- }
- });
-};
-
-/**
- * When a payment is approved by the user, we can go ahead and execute it.
- */
-function executePayment(parameters) {
- console.log('Executing an Approved Payment');
-
- // Appended to the URL by PayPal during the approval step.
- let paymentId = parameters.paymentId;
- let payerId = parameters.PayerID;
-
- // Generate the sample payment execution JSON that paypal requires:
- let paymentJson = executePaymentJson(payerId);
-
- // Grab the encoded address object, URL decode it, and parse it back into a JSON object.
- let addressEncoded = decodeURIComponent(parameters.addressEncoded);
- let address = JSON.parse(addressEncoded);
-
- // Finally, execute the payment, and tell the user that we got their payment.
- paypal.payment.execute(paymentId, paymentJson, function (error, payment) {
- if (error) {
- console.log(error.response);
- throw error;
- } else {
- console.log('Payment Executed Successfully');
- respondToUserSuccess(payment, address);
- }
- });
-}
-
-/**
- * This function completes the payment dialog by creating a message, binding an address to it,
- * and sending it.
- */
-function respondToUserSuccess(payment, address) {
- let message = new builder.Message().address(address).text('Thanks for your payment!');
-
- bot.send(message.toMessage());
-}
-
-/**
- * If a user chooses to cancel the payment (on the PayPal approval dialog), we should
- * back via the bot.
- */
-function cancelledPayment(parameters) {
- console.log('Cancelled a payment');
-
- let addressEncoded = decodeURIComponent(parameters.addressEncoded);
- let address = JSON.parse(addressEncoded);
- let message = new builder.Message().address(address).text('Cancelled your payment.');
-
- bot.send(message.toMessage());
-}
\ No newline at end of file
diff --git a/Node/capability-botToWeb/complete_flow.gif b/Node/capability-botToWeb/complete_flow.gif
deleted file mode 100644
index 20c9e2016e..0000000000
Binary files a/Node/capability-botToWeb/complete_flow.gif and /dev/null differ
diff --git a/Node/capability-botToWeb/index.html b/Node/capability-botToWeb/index.html
deleted file mode 100644
index c42c37a13b..0000000000
--- a/Node/capability-botToWeb/index.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Node/capability-botToWeb/package.json b/Node/capability-botToWeb/package.json
deleted file mode 100644
index 962040011a..0000000000
--- a/Node/capability-botToWeb/package.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "node-paymentbot",
- "version": "1.0.0",
- "description": "An example of a bot that pays people",
- "main": "app.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/bnookala/node-paymentbot.git"
- },
- "author": "",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/bnookala/node-paymentbot/issues"
- },
- "homepage": "https://github.com/bnookala/node-paymentbot#readme",
- "dependencies": {
- "botbuilder": "^3.7.0",
- "paypal-rest-sdk": "^1.6.9",
- "restify": "^4.1.1"
- }
-}