File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ environment settings, a mix of either)
35
35
36
36
## Example usage
37
37
38
+
39
+ ### 1.
38
40
In your main flask app, inside create_app
39
41
40
42
```
@@ -78,13 +80,29 @@ your existing flask application. This makes `flask_saas` flexibily and (hopefull
78
80
eaiser to integrate with your existing application/database or object store.
79
81
80
82
For example, to implement ` get_stripe_secret_key ` , if your flask application stores
81
- your Stripe key as an envrionment variable called ` STRIPE_SECRET_KEY ` , then you might write(Before Flask_Saas):
83
+ your Stripe key as an environment variable called ` STRIPE_SECRET_KEY ` , then you might write (before ` Flask_Saas ` instantiation ):
82
84
83
85
```
84
86
def get_stripe_secret_key():
85
87
return os.getenv("STRIPE_SECRET_KEY")
86
88
```
87
89
90
+ ### 2. Create link to Stripe connect onboarding
91
+
92
+
93
+ In your flask application, create a link to the route ` stripe-connect.index ` to start the Stripe onboarding process.
94
+
95
+ For example: create a template called ` stripe-connect.html ` , and write:
96
+ ```
97
+ {% extends "layout.html" %}
98
+ {% block body %}
99
+ <h2>Connect to Stripe</h2>
100
+ <a href="{{ url_for('stripe_connect.index') }}">Connect to Stripe</a>
101
+ {% endblock %}
102
+
103
+ ```
104
+ Reload your application, and you should see a link to stripe-connect.
105
+
88
106
## Building / Development
89
107
90
108
```
You can’t perform that action at this time.
0 commit comments