-
Notifications
You must be signed in to change notification settings - Fork 3
WIP Feature/payments (handle stripe charges) #23
Conversation
|
Ok this is almost ready. Missing:
|
|
Rules seems to work, even when logged in |
src/app.js
Outdated
|
|
||
| admin.initializeApp({ | ||
| credential: admin.credential.cert(serviceAccount), | ||
| databaseURL: "https://radio4000-staging.firebaseio.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make another file that exports the current databaseURL?
We can use it above ^ and here: https://github.com/internet4000/radio4000-api/blob/master/src/app.js#L27
package.json
Outdated
| "deploy-api": "firebase use api; firebase deploy --only functions", | ||
| "deploy-rules": "firebase use production; firebase deploy --only rules" | ||
| "deploy-rules": "firebase use staging; firebase deploy --only database", | ||
| "deploy-rules-production": "firebase use production; firebase deploy --only rules" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't both the rules scripts use --database? Seems --rules is the old way to do it.
package.json
Outdated
| }, | ||
| "dependencies": { | ||
| "cors": "^2.8.4", | ||
| "firebase": "^4.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since these deps are for our app they should be moved to src/package.json. Also, is firebase needed? there is already firebase-admin.
Frontend handles Stripe payments, receives a token, and passes it tothe backend (firebase function with express).
chargeto stripechannelmodel toisPremium: true