Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rants about the Payola gem and open issues #148

Open
nikolay12 opened this issue Jun 2, 2015 · 21 comments
Open

Rants about the Payola gem and open issues #148

nikolay12 opened this issue Jun 2, 2015 · 21 comments

Comments

@nikolay12
Copy link

I entered wrong credit card data and got error message (which was not displayed fully as mentioned in an issue that I raised earlier today) - yet the user was created and stored in the database. I can see the DB record.

@ghost
Copy link

ghost commented Jun 7, 2015

I was just about to report on this just now too. This is also the messages the user will get:

Your card was declined.
Welcome! You have signed up successfully.

Confusing indeed. So then you have a user created and a subscription entry in the db that isn't active. I'm wondering what the real-world purpose would be for creating this subscription entry even though the card was declined?

The form won't let you add another credit card and hit the signup button again so putting in a new credit card number and hitting the button again won't work (if it did, it would need to update that first bad subscription entry and I suspect it won't).

If you refresh the page, you will get a second entry for EVERYTHING in the database just from hitting refresh and will still have to put in the new credit card and hit the signup button again which would create a 3rd entry. So one has to put some validations on to keep the same info from being resubmitted but of course then the potential customer is screwed because they can't go any further until we clean up the db since their first try didn't work.

What I will try to do is rollback the account & subscription data if the subscription isn't valid.

But users need to be able to resubmit the form if the card is declined without refreshing the page.

@nikolay12
Copy link
Author

@threewest I know. The codebase is very far from production quality. Daniel should put really big advisory note in the readme about it being unsuitable for real world applications. It's OK for demo purposes and as a teaching device but not for much more.

@ghost
Copy link

ghost commented Jun 7, 2015

@nikolay12 I'm learning that the hard way. I really wanted to launch my app but I just can't because of the payment system. It needs to be tested against real world usage scenarios. "What would a customer do?"

I like the one page checkout but I definitely would like a different way to use Stripe for payments and subscription update events. Now that I have a little more of an idea of how things work in rails, I might try the stripe and stripe events gems again. Then I'd like to run the whole process through real-world scenarios. Declined cards is basic and no account or subscriptions should be created if a card gets declined. That way, the customer can just recheck the card data and fix it or use another card and hit the submit button again.

The way it is now, if a card gets declined, the customer just got a free account.

UPDATE: I've officially got rid of Payola from this app. I'm working with the Stripe and Stripe_event gems now. I'm going to try to implement something simple but working as it should in the wild.

@nikolay12
Copy link
Author

@threewest I froze my work with the codebase of this tutorial, too. I signed up with Pete Keen's "Mastering Modern Payments". So far I've worked through the first three chapters and lots of things became much clearer. I hope by the end of that tutorial I'll have a code base that I can trust.

@ghost
Copy link

ghost commented Jun 10, 2015

@nikolay12 I bought "Mastering Modern Payments" a little while ago and requested the refund because it wasn't correct. I hope it has improved since then.

The weak link is the Payola gem. I've managed to turn the app into a fully working multi-tenant app using subdomains and even with that the only one feature that I'm having a problem with (logging the user into the subdomain after subscription) is being caused by the Payola gem.

@kathyonu
Copy link
Contributor

@nikolay12 , @threewest , @archonic , @randomguy1212 , @Austio , @DanielKehoe My previous comments are an old hat no longer worn, so I withdraw them here. I will take Daniel's advice below .. I will see if I can translate the tests we have developed on our production app based on the Rails 3.2 branch which we have brought up and kept current code wise, onto a new branch of the master.

If you know RSpec and stripe-ruby-mock, or want to learn them and want to help improve / fix up tests, I invite you to contribute, contact me now, it will speed things up. (I will start pushing the last three months developments of tests now, if I know someone is going to be running them to see what is what and can add to the motion in the ocean.)

@ghost
Copy link

ghost commented Jun 10, 2015

@kathyonu I hear you 100%. There are some issues there for sure. I didn't know about the ads. Wow. Some devs release free code so the community can fix the bugs only to turn around and sell those improvements back to the community.

I also agree with you 100% about using only stripe directly for payments. I tried for a long time before to get what I needed that way but being fairly new to rails I couldn't wrap my mind around it (I was rushing). But that was then. Now I feel more confident I can get it to work with just the stripe and stripe_event gems. I agree it's better working directly with Stripe and Devise in a new app.

@randomguy1212
Copy link

@threewest @nikolay12 - This is provided for free by someone who has spent countless hours helping the community. If you don't like it fork it and create something better, if you can't then learn how to change what you need and stop complaining. If you want something out of the box, go pay someone money for it, but dont be mean and rip on this guys years of hard work because it doesn't do exactly what you want. Your comments reflect on the rails/ruby community, so please stop.

@ghost
Copy link

ghost commented Jun 10, 2015

@randomguy1212 I don't feel I was being mean or ripping on him. I know he worked a lot on the gem but it is what it is. I have a right to point that out ant it's not being mean to do so. Stay random. 0

@archonic
Copy link

That's quite a rant. It seems to me Payola is capitalizing on the complexity of Stripe which I don't really like (especially because Stripe documentation is pretty great), but you're not owed anything. Fork it and make something you want out of it, or drop it altogether and move on. I've got a fork to build support for free plans and trials with no credit card at sign up but have so far had trouble getting users associated with their subscription. Unless I can get that working in the another day or two, I'll drop it and work with Stripe and Stripe event directly.

@Austio
Copy link

Austio commented Jun 10, 2015

@archonic agreed, do you need help with this? If so hit me up and will be happy to pair for a bit with you over the weekend to get over the hurdle.

@nikolay12
Copy link
Author

@randomguy1212 I think you misinterpreted this. I find Daniel's work awesome - as a teaching aid. But the code is not production quality - that's the fact. I don't think stating this fact should be treated as insulting. The reason I bothered to raise the issue is (A) hoping that someone may fix it and (B) warn others of the pitfalls. (B) alone would justify raising the issue. I don't think the tone or the language I used is insulting - but I am prepare to apologise if it sounds so.

@DanielKehoe
Copy link
Member

tl;dr: Be constructive and contribute tests and fixes!

I'm happy to see this discussion as it is important to identify issues. I also understand and feel the frustration of having expectations not met. It's important to remember this is open source development.

Pete Keen is an open source developer, as am I. We both hope to find a business model that will support continued open source development. Pete Keen does consulting and offers a free/paid version of his gem to support his project. I make all code available for free and I write tutorials, hoping that people who use the code will support the project with a subscription and be willing to pay for the tutorials. I believe anyone who works on open source deserves respect and appreciation, even when the efforts fall short of our expectations. Also, no one is entitled to code for free; we all must find ways to support continued open source development, and sometimes that means trying different business models.

The rails-stripe-membership-saas application is the project that could kill the entire RailsApps project. It is the most ambitious and complex of all the starter applications I've created. The first version, which I created three years ago, was popular and also a source of many complaints. Giles Bowkett wrote an entire ebook (which he sold) criticizing the architecture of the project (and he never contributed any pull requests or code to improve the project). Many people were very vocally unhappy when newer versions of Rails came out and I did not update the project. To provide sufficient documentation for a beginner to understand the application, I wrote a dozen simpler tutorials (and a book), which took over two years.

I chose to use Pete Keen's Payola gem when I updated the application. I wanted to simplify the application complexity and leverage the benefits of a tested and well-supported gem. It was difficult to integrate the Payola gem with Devise. Pete Keen responded graciously to my requests for help. With Pete Keen's help, or help from the developers who use the application, I believe this application could become a useful reference implementation for integration of the Payola gem with Devise. However, given the negative comments and complaints I've seen, I will understand if Pete Keen decides not to help.

There are good reasons to consider implementing the rails-stripe-membership-saas application without the Payola gem. However, without help from the community, I'm reluctant to start the project. Unlike the other starter apps from the RailsApps project, the rails-stripe-membership-saas application is too complex an application for me to develop and maintain on my own. The work required to build and maintain the application, without help from other developers, has already impacted the RailsApps project, to the detriment of the other applications. Work on the rails-stripe-membership-saas application has prevented me from updating and writing new tutorials, which are the sole source of financial support for the RailsApps project. Frankly, the RailsApps subscriber base is declining, which may mean the death of the project.

At this point, the rails-stripe-membership-saas application needs a set of robust tests. The tests are needed whether we choose to continue to base the application on the Payola gem or we build a stand-alone implementation. @kathyonu has made a valiant effort to write tests, but his tests need code review and integration, as he is new to testing. I've been hoping developers will step forward and contribute tests so we can continue.

A few developers have reported issues (and their frustration, too, in the form of rants). Some have implemented fixes for their own custom applications without contributing code back to the project as suggestions or pull requests. If I don't get code contributions to resolve the issues, and help with tests, I will mark this project as "abandoned" and move on.

Unfortunately, many developers who want to use the rails-stripe-membership-saas application consider themselves "inexperienced." That means they wait for someone more experienced to solve problems. I'm sorry to say I am not the authority who is going to solve the problems. When it comes to this application, I am also "inexperienced." Without help from other developers, experienced and inexperienced, I will pull the plug on this project. So I ask respectfully, what can you contribute to resolve the issues?

This is an open source project, so you can either contribute, or give up and look for another implementation elsewhere. I hope you'll contribute.

@DanielKehoe DanielKehoe changed the title User is created even if the sign up fails Rants about the Payola gem and open issues Jun 11, 2015
@kathyonu
Copy link
Contributor

@josh Regarding your app with free plans and no credit card sign up .. and,
Regarding your difficulty with associating users with their subscription ..
I would be very interested in looking at your tests, if you have them .. and,
Your codes even if you don’t have tests …
These two capabilities are something I will be working into our production app .. and,
I would be happy to write the tests for your app in terms of pinpointing the difficulties ..
and resolving them.
Work it as much as you want, before you want to take a break from it ..
then send me the repository address at github .. and take some time off from it while I work it for you.

oh, one condition ..
it cannot have the gem in question mentioned in it, not one time.
i will not work on apps that involve themselves with payola in any way, shape, name or form.

my work is pure stripe, and pure testing of stripe, and i am overcoming the difficulties of the intricacies of stripe with
good old fashion study and looking up every word, term, command, method and uses, as i go along so as to understand.

Over time, Stripe set up and testing have begun to be easy peasy lemon squeezey.
Currently, I am writing tests for Stripe::Account in all its beautiful simpliciy, and enormous power.
I Love Stripe.
I Love RailsApps.
I Love stripe-ruby-mock, as it gets the job done, and .. it is documented pretty well, and improving.

one last point, the ranting and raving as you hint it to be, is not that.
i see it as developers having the courage to first study the problem,
then describe the problem, and identify the source of the problem.
i for one am thankful others have now identified a major source of difficulties and problems in the rails-stripe-membership-app,
and the real diffficulties for me have been writing the tests for this app. I have an in production pure stripe app with almost all
of stripe actions/results testings in place .. and it was fun writing those codes.
i had written Daniel privately on the matter, so as to not ‘muddy the membership app waters’ with my own viewpoint of what is happening,
and why the use of that gem is a major error, one that should be undone and the app should return to pure stripe and pure stripe testings.

point me to your app when you are ready to take a break from it, and i will do my very best for you in resolving the problem, through testing.
if you do not have tests written .. it would help me greatly if you could take the time and formulate the RSpec test lines you want to incorporate
that will give you the result you are coding for. All i as for are the it statements .. i will write the codes to test if you do not have them.
(( i wrote these off the cuff just now for this email to you .. faster than pulling them out of an app ))
Examples, with one filled in, and please do adjust them as needed to reflect your app :

20150610 : beginnings of Free Plan tests

describe 'Free Plan' do
describe 'Visitor Sign up' do
it 'visitor arrives on a landing page' do
it 'visitor can see Free Plan link' do
it 'visitor can click on Free Plan link' do
it 'visitor arrives on Free Plan Sign up page' do
it 'visitor can see the form to fill in' do
it 'visitor can fill in the form' do
it 'visitor can see the Sign up button' do
it 'visitor can click on the Sign up button' do
it 'visitor arrives on Free Plan Content page' do
visit content_free_path
expect(current_path).to eq '/content/free’
end
it 'visitor becomes a User upon successful Free Plan Sign up' do
it 'user is assigned the correct Free Plan role.id' do
it 'user is assigned the correct Free Plan plan.id ' do
it 'user can arrive on their account edit page' do
it 'user sees the Edit account link' do
it 'user can click on the Edit account link' do
it 'user arrives on their Edit account page' do
it 'user can see the Change Your Plan button' do
it 'user chooses the Silver Plan selection' do
it 'user is presented with the credit card signup form' do
it 'user can now fill in the required information' do
it 'user can see the Change Plan button' do
it 'user can click on the Change Plan button' do
it 'user credit card information is processed to stripe' do
it 'user form waits for stripe response' do
it 'user form receives StripeToken' do
it 'user information is processed' do
it 'user Plan Change Sign up is successful' do
it 'user is now on the content/silver page' do
end
end

On Jun 10, 2015, at 2:42 PM, Josh notifications@github.com wrote:

That's quite a rant. It seems to me Payola is capitalizing on the complexity of Stripe which I don't really like (especially because Stripe documentation is pretty great), but you're not owed anything. Fork it and make something you want out of it, or drop it altogether and move on. I've got a fork to build support for free plans and trials with no credit card at sign up but have so far had trouble getting users associated with their subscription. Unless I can get that working in the another day or two, I'll drop it and work with Stripe and Stripe event directly.


Reply to this email directly or view it on GitHub #148 (comment).

@archonic
Copy link

Well put. I think your free code access + subscription to documentation and tutorials is a great setup. I'm subscribed and will stay subscribed. I'd also contribute to a Patreon campaign if you set one up. I'd love to use this app as a foundation for at least 3 projects, all of which would have cash flow, 1 of which is currently funded and in need of a rewrite.

"So I ask respectfully, what can you contribute to resolve the issues?"

I'm hoping kill the no credit card required free plan and trial sign up this weekend. Perhaps with help from @Austio 😄. I'd love to help with tests but I'm a bit green in that area as well.

@kathyonu Sorry dude, right now I'm working on a forked Payola solution with the goal of it becoming a part of master. I may bail on it in which case I'll ping you.

@kathyonu
Copy link
Contributor

@josh , that’s okay .. i have plenty to do.

On Jun 10, 2015, at 7:39 PM, Josh notifications@github.com wrote:

Well put. I think your free code access + subscription to documentation and tutorials is a great setup. I'm subscribed and will stay subscribed. I'd also contribute to a Patreon campaign if you set one up. I'd love to use this app as a foundation for at least 3 projects, all of which would have cash flow, 1 of which is currently funded and in need of a rewrite.

"So I ask respectfully, what can you contribute to resolve the issues?"

I'm hoping kill the no credit card required free plan and trial sign up this weekend. Perhaps with help from @Austio https://github.com/Austio . I'd love to help with tests but I'm a bit green in that area as well.

@kathyonu https://github.com/kathyonu Sorry dude, right now I'm working on a forked Payola solution with the goal of it becoming a part of master. I may bail on it in which case I'll ping you.


Reply to this email directly or view it on GitHub #148 (comment).

@kathyonu
Copy link
Contributor

@nikolay12 , @threewest , @archonic , @randomguy1212 , @Austio : This note replaced with my next comment.

@kathyonu
Copy link
Contributor

kathyonu commented Jul 1, 2015

@nikolay12 , @threewest , @archonic , @randomguy1212 , @Austio : Please see PR Testsformaster #150 . I invite you to pull this branch into your working app, and take it for a spin. If you can help resolve the four pending tests, that would be grand, thank you.

@nikolay12
Copy link
Author

@kathyonu, @DanielKehoe I've forked one of Daniel's repositories (the Devise app one) and added Stripe SaaS functionality without the payola gem. I've solved the problem that made me open this issue - namely the fact that Daniel's code allows for opening up an account even if the Stripe CC verification fails. I've done this by encapsulating the Subscription registration in a service object i- the account registration is performed only of the Stripe registration is successful. This is my git repo. I've written a (quite lengthy) tutorial that explains the code. Please, feel free to use.

@kathyonu
Copy link
Contributor

kathyonu commented Aug 5, 2015

@nikolay12 @DanielKehoe Beginning to read your material on this and arrived here, Overriding Devise to Skip Setting of Password (Rails4, Devise3). This is stunningly brilliant, "I decided to override the default registration workflow so that Devise sets a password which is sent to the user." So utterly and elegantly simple, I wish I had thought of it.

I can easily accept the slght imperfection of the password being sent in plaintext to the user. One instruction in the email to immediately change the password solves that problem. I am giving this puppy a spin up. mEye, Thank You == Kathy Onu

@kathyonu
Copy link
Contributor

kathyonu commented Aug 5, 2015

@nikolay12 greetings again, i would send these notes to you via email, but cannot do so ..

  1. please add your contact information on github : https://github.com/nikolay12
  2. please explain in the tutorial : git reset --soft 74a92e4ce4934f3e06a753c2d93e2127930192d0
  3. is this a typo : It is called by the RegistrationsController abobe.
    Thank You

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants