Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I'm trying to get started with stripe to build out a Patreon like app. I've done a lot of searching and have even started with these docs from Stripe. Unfortunately, I am encountering many problems, probably as a result of a faulty integration.
What I am using:
I am using Firebase database.
Express accounts in stripe
iOS
What I am trying to achieve:
User1 can create a subscription of his chosen price.
User2 can join/pay the subscription.
User1 gets 70% of his money made from the subscription, and I the developer get remainder.
What I have done so far:
Created a Stripe account and set it up at a very base level.
created an Xcode project and included code up until step 2.3
I have setup firebase functions at a base level, and have some code in there from steps up to 2.3 in link above.
What I would like is to have a clear starting point, and path to follow.
How do I get started in achieveing this goal?
Just commenting on the Stripe portion -- what you can do is have a page where your content creators (i.e. User1) can create a Product. Each Product must be tied to a Price:
On another page, retrieve all active Products so content receivers (i.e. User2) can subscribe to it.
Full details can be found at https://stripe.com/docs/billing/prices-guide.
For the revenue splitting, Stripe doesn't seem to support this. Your only option is to do a payout to your business bank account, then further disburse the 70% to your content creators. For this, you must be able to match payment records on Stripe to your database, e.g. design your database in such a way it can answer the SQL query "what is the total amount paid to this particular content creator within a given time period?".
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have been researching around the web on how to create a friends list system using firebase. So far I had no luck and was given resources that was not quite what I was looking for. The premise of the app is using the User Login & Authentication to create a account(completed), then once the user has an account they can add people that are register in the firbase users. This can comparable to a friends list. once the user adds another user they can have an option to create a post that only his friends can see and the users can group chat in side the post.
The Problem:
Don't know where to start in creating a friends list using firebase custom User Login & Authentication
After that how do only the people that are add to the users friends list see the content posted.
P.S. just looking for some guidance on the subject from anything to resources to/ tips
Kato's comment is on point. Being super new to Firebase can be a bit daunting so here's some ideas:
You cannot use the Login & Authentication in the way you want. It is a function that allows you to create users that can access your Firebase and that's it.
If you want to do more with users, create a /users node that contains other stuff.
users
uid_0
name: "Frank"
friends
uid_1: true
uid_2: true
uid_1
name: "Kato"
uid_2
name: "Bill"
This tells us that Frank has two friends, Kato and Bill.
To accomplish your task, Firebase will need to notify your app when new users sign up (by adding them to the users node and observing the Users node for .childAdded) and then display the new users to your user so they can add them to their friends list.
Posts can be handled in a similar fashion
posts
post_id_0
msg: "Hey look kids, there's Big Ben, and there's Parliament"
posted_by: uid_0
viewers:
uid_1: true
This structure has a post reference (created by autoId), a msg and who posted it and who's allowed to view it, in this case user with a uid_1, Kato.
Saving Data and Retrieving Data are critical reads and simply going through the well-written Firebase Guide to the Stars is a must.
Hope this provides some direction, and in the future, craft your code, create a Firebase structure and when you really get stuck, post those (as text please) as they will help us, help you.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am looking to build a feature where folks can be notified via email when certain content is published on our website. Users would provide their email address, select a few subject areas they are interested in and the frequency in which they want to be updated (daily or weekly).
What is the best practice for building such a system?
I figured I would start with some sort of Subscriptions table (postgres) that would have the following fields:
email
subject_areas (list of IDs?)
frequency (daily/weekly)
last_emailed (timestamp)
I could build a job that would run every night against this table which would hit each row and aggregate all content that matches the subject_areas they were interested in, generate the email and throw it into a 3rd party email service like Mandrill or Amazon.
Does this seem like a good approach or is there a better way to tackle this?
The tables would likely be:
Users (email, name)
Subjects
Subscriptions (user_id, subject_id, last_emailed, frequency)
The other part you want is a background job queuing system (delayed_job, sidekiq, or resque) that you'll put the jobs in. A worker process will process jobs and send them in another process.
Cron and BG jobs go hand in hand
Cron (or a scheduler).
Find all users that have subscribed.
For each user - figure if there is new content to send them
Load up jobs for users that have new content to receive
Background Worker
For each user_subscriber_job - build email content based and user info and subscribed content
Send email out
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am making a job board and am in the process of making a subscriber list for job seeker who, if willing, can be sent a notification email that the job of their interest has been posted. I have tried google in order to come up with how to start making such functionality but couldn't find something I could use.
I am using sedngrid for sending emails (transactional) which is currently working fine. I wanted to ask how should i make the job alert functionality .
What comes to mind is:
Making a subscriber model
On every Friday night, find all applicants which has subscribed to the job alert.
Find these applicants interests (tags)
Check if any jobs with these tags has been posted in the week.
Send emails to the applicants email.
Is there any gem or gems which give this functionality, or a tutorial?
You don't need gems really.
The Job model will need to have:
belongs_to: location
belongs_to: category
belongs_to: company
belongs_to: salary_range
You might (for simplicity) have the above as plain-attributes instead of separate models. But, I would opt them to be separate models.
Create a model Subscribe that holds the user_id and their interests, say company_id or job_location_id. I rather say, this should be a polymorphic association like :
user_id (integer)
subscribe_type, subscribe_id (links to location/company/job-category)
Write a Cron Job that runs daily/weekly/periodically (use whenever gem) that finds the delta of jobs created from the last-cron-run till date.
Loop on the jobs and find the corresponding subscriptions for its location, job-category, company & etc.
Send emails to the corresponding folks.
While enhancing the app, you will face 2 issues:
Instead of sending one email per every job, is there a way to send one-single-email to the user about all the jobs he is interested in. This is called Email-Digest.
What if any job-details are changed? Should you update the user about the changed-job too?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I don't understand a thing about the Card, Conversation, Confirmation formula for user stories.
I don't understand if the conversation and confirmation part must be written down or they remain as a dialogue, in particular the CONVERSATION part.
To be clear: is it right if a write down ALL these things in user stories? (see example below)
Or do I have to write down only the CARD part?
Example:
CARD
As a user of a coffee machine, I want to be able to purchase a beverage.
CONVERSATION
- The user will not be able to purchase a beverage if they do not deposit enough money into the CoffeeMaker
- A user's money will be returned if there is not enough inventory to make the beverage
CONFIRMATION
1 user introduces the amount of money needed to purchase the beverage
2 user selects the beverage
3 user gets the beverage
The 3 C's is a saying used to serve as a reminder on what is important when using User Stories.
A simple card to write down the requirements - as opposed to a heavy weight document.
Having a conversation - collaborating to define the requirements and understand the value.
Confirmation - agreeing on the acceptance criteria, so you know when you are done.
There is another saying which sums up the idea behind User Stories nicely. "The card is a place holder for a conversation". This highlights that the conversation is the important part, not the card artifact. The card can be discarded once the feature has been developed and automation tests written using any suitable acceptable criteria.
The format of a User Story will typically follow:
As a (role) - This can be an end user or a business proxy
I want - A description of what need to be done
So that - the definition of the value
An attempt at your scenario
As a vending machine customer
I want my change returned
So that I do not loose my money
The confirmation part could just be bullet points on the back
Change should be returned if the customer does not put in enough money and then selects a beverage
Or you can use the context specification style, a BDD (Business Driven Development) technique
Given a customer does not put in enough money
When they select a beverage
Then their change should be returned
If you would like to know more I would suggest researching the INVEST principles and reading Mike Cohn's User Stories Applied.
You can do whatever you want ;), from writing down everything to memorizing everything and writing nothing. Personally I write everything down, so the next dev that picks up the story can understand as much as I do and pick up from there.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm working on an ruby on rails app that has a special billing method.
I'm creating a store where users can reserve products but will not get charged for these products until a certain amount has been reached. This amount cannot be quantified by time so I'm wondering if this is a recurring payment. However, accounts will have to provide a payment method in order to reserve these products and it is cumbersome to have them give their information every time. What's more is that I need their information so I know they want the product but I won't charge it right away.
What to do?
First you want to capture card details up front, but not make any charge.
That can be done with most payment service providers (PSPs). Usually you will redirect from your site to a site hosted by the PSP which captures the card details. Once the user leaves that page they will redirect back to your site, and you will receive a payment Token, which is essentially a GUID which can be used in future transactions instead of a card number.
Each time you want to take payment from that card you can submit your Token Id and payment value to the PSP for authorisation and settlement. Bear in mind that its entirely possible that the authorization could fail or be declined.
This is technically known as a recurring payment in that there are potential complications which your PSP should handle for you, such as credit cards expiring, or being replaced. Decent PSPs will make use of the Visa Account Updater service, or the equivalent Mastercard Automated Billing Updater to ensure that behind the scenes the card number is automatically updated. Worth checking that your chosen PSP provides this capability.
I recommend outsourcing this to a company that handles payments, I advise against PayPal because of charges. You will end up getting into a lot of trouble if you are writing everything from the ground up.
Beyond that I am assuming this is a real world scenario. In that case I wouldn't consider it a recurring payment, on account of it is a once and done payment. Forgot to add, store their information with a 3rd party vendor or get really good at knowing the rules of what you can and cannot store online.