The communication between Firebase and PAddle is done via the Python cloud function in the payment_app/ folder - see its README for details. The Firebase databsae "subscriptions" is used to keep track of whether a user has paid or not. If a subscription fails (the credit card is cacnelled or similar) then Paddle updates. If a user does have a subscription, then they see the paid content. The firebase auth ID is used to verify if the user has an existing subscription, and if not creates a payment button to do so. The Shiny App will offer to link to the payment popup via Paddle after login with Firebase Auth. pdle_subscribe() creates a subscription button - you can select which product_id, user_id (the firebaseId is suggested), email to pre-populate in the form and the URL redirect that will be visited after payment.usePaddle() is placed at the top of pages you want to use Paddle in, and loads the Paddle JS library.fb_document_get() gets entries to the Firebase database, Firestore.See the global.R for the payment functions that are used in the demo app, and you can adapt to your own use:.Deploy the test Shiny app in shiny/ with the client auth key and.Run the Shiny app on to test locally ( doesn't work with Firebase login) - I launch Shiny in Viewer pane then visit in my browser.Gar_service_provision( "firebase-reader ", "roles/datastore.viewer ") # creates firebase-reader-auth-key.json file
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |