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

Thanks for this gem!

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
  • 1 on a demo app for this video Chris?
Reply

I can't seem to get a particular use case to work. If you subscribe with a free trial using a card that requires SCA, the payment/show view looks for an 'amount' parameter which is in payment_intents but not setup_intents. it looks as though it might need a 'setups' controller in addition to the 'payments' controller, unless i'm missing something?

Reply

Yep, I was missing something. Need to create setupIntent first, then create subscription.

Reply

How do we add the redirect url after Stripe payment?

Reply
Join the discussion
Create an account Log in

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

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

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