All threads / How to use the Pay gem to accept Payments in Rails Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to use the Pay gem to accept Payments in Rails Discussion

Hey Chris,
What should we do if we just want to authorize payments without attaching a card to a user?
Maybe we could simply delete the card after the payment but I don't even see a way to properly delete a card from a user in Stripe documentation. With Payment Intent it seems that we can just detach it but not delete it.

Also do you have any advices to add another Payment Provider to this gem in addition to the github Wiki page? There are other providers like MangoPay out there that don't charge anything for a refund unlike Stripe.

Reply

Hi - When I call current_user.subscribe, it returns "NameError (uninitialized constant Stripe::PaymentMethod)". I've looked through the gem source files, and I don't see why I am receiving this error. Everything else working up until this point.

I'm confused because the wiki uses the createToken method in step 5, but the gem readme indicates you shouldn't use the createToken method, but instead use createPaymentMethod.

Reply
Reply

Looks great! What's the main benefit to using Stripe with Pay, rather than Stripe solo? We have Stripe subscriptions already set up on our site. Would this augment what we already have?

Reply

Have you done a repo for this tutorial, Chris?

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.