Title: | Servicebot 'Shiny' Integration |
---|---|
Description: | Create in-app purchasing and subscriptions through 'Servicebot' payment using the 'Stripe' framework. |
Authors: | Bjorn Ole Lindseth [aut, cre], Stian Berger [ctb], Capia AS [cph] |
Maintainer: | Bjorn Ole Lindseth <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-10-25 05:32:55 UTC |
Source: | https://github.com/capiaas/shinyservicebot |
INIT SERVICEBOT
init(servicebot_secret = NULL, secure_setup = FALSE, dev_mode = FALSE)
init(servicebot_secret = NULL, secure_setup = FALSE, dev_mode = FALSE)
servicebot_secret |
'Servicebot servicebot_secret' |
secure_setup |
'HMAC string to be generated in embeds |
dev_mode |
'Debug mode' |
Run examples of using shinyservicebot in a Shiny app
runPortalExample()
runPortalExample()
if (interactive()) { runPortalExample() }
if (interactive()) { runPortalExample() }
Run examples of using shinyservicebot in a Shiny app
runPricingExample()
runPricingExample()
if (interactive()) { runPricingExample() }
if (interactive()) { runPricingExample() }
Run examples of using shinyservicebot in a Shiny app
runSignupExample()
runSignupExample()
if (interactive()) { runSignupExample() }
if (interactive()) { runSignupExample() }
Generate JWT
secure_setup(email, key)
secure_setup(email, key)
email |
Valid email adress |
key |
Secret key |
JWT
This function renders the html output for servicebot embeds
shinyservicebot(servicebot_config = e$servicebot_config, dev_mode = e$dev_mode, width = NULL, height = NULL, elementId = NULL)
shinyservicebot(servicebot_config = e$servicebot_config, dev_mode = e$dev_mode, width = NULL, height = NULL, elementId = NULL)
servicebot_config |
This is the embed config for servicebot as described by servicebot. See https://docs.servicebot.io/subscription-portal/subscription-management-portal/subscription-management-portal-configuration for config options. See the examples section below. |
dev_mode |
For use in development. Set to FALSE in production |
width |
With of html widget |
height |
height of html widget |
elementId |
elementId Use an explicit element ID for the widget (rather than an automatically generated one). Ignored when used in a Shiny app. |
# Init servicebot pr user login shinyservicebot::init(dev_mode = TRUE) # Config servicebot_config = list ( servicebot_id = "E0OQN0P0Dort", # // LIVE & TEST MODE IDs ARE DIFFERENT service = "Flat Subscription", email = "[email protected]" ) shinyservicebot::shinyservicebot(servicebot_config, width = "auto")
# Init servicebot pr user login shinyservicebot::init(dev_mode = TRUE) # Config servicebot_config = list ( servicebot_id = "E0OQN0P0Dort", # // LIVE & TEST MODE IDs ARE DIFFERENT service = "Flat Subscription", email = "[email protected]" ) shinyservicebot::shinyservicebot(servicebot_config, width = "auto")
Customize html
shinyservicebot_html(id, style, class, ...)
shinyservicebot_html(id, style, class, ...)
id |
Id of div element |
style |
Style element of html |
class |
Class id of div element |
... |
Other params |
Output and render functions for using shinyservicebot within Shiny applications and interactive Rmd documents.
shinyservicebotOutput(outputId, width = "100%", height = "400px") renderShinyservicebot(expr, env = parent.frame(), quoted = FALSE)
shinyservicebotOutput(outputId, width = "100%", height = "400px") renderShinyservicebot(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
width , height
|
Must be a valid CSS unit (like |
expr |
An expression that generates a shinyservicebot |
env |
The environment in which to evaluate |
quoted |
Is |