mouhannad
mouhannad

Reputation: 39

Implement payment in Bot framework V4

I want to implement payment in bot framework V4. I couldn't find any sample in c#. my main problem is after the payment page is open how to return back to the chat after the payment is done.

Upvotes: 0

Views: 158

Answers (1)

Marc Asmar
Marc Asmar

Reputation: 1577

It depends on the Channel you are using, For example in a Facebook Messenger Webview they provide you with an SDK so you can send/receive data between the Webview and the chat.

  • In Facebook Messenger the webview can be opened directly inside the chat, when it's close you directly get back to the chat.
  • In a Twitter bot once you close the Webview, you also get back to the chat. But i don't think they provide an SDK like Facebook from which you can know once the user is done.
  • In the Direct Line Channel ( WebChat ) the default behavior will open a new tab so you can't really know from the bot once the payment is done in the new tab.

But in all cases you can provide the user with a payment URL containing data that can identify that user. Once the user completes the payment in that new web page, you can then trigger the bot to send a proactive message for the user on the chat and continue from there.

Upvotes: 1

Related Questions