Ruby on Rails #5 Stripe API - Pay Now Button with Stripe Checkout API

  Рет қаралды 18,264

SupeRails

SupeRails

Күн бұрын

Пікірлер: 57
@francois-yu7bq
@francois-yu7bq 2 жыл бұрын
I tried the method with the Pay gem but I much prefer yours which is native Stripe and so much lighter. Many thanks !! Good job!
@SupeRails
@SupeRails 2 жыл бұрын
that's the exact reason I do it this way, without any extra dependencies :) be sure to check my latest commit with some improvements: github.com/corsego/shoplify/commit/7ec7a902db3bdb2194f7a5dfed5597c27d7a4993
@yeinercarvajalquina7727
@yeinercarvajalquina7727 11 ай бұрын
Thank you Yaro, I always find your videos as awesome!
@AhmedNadar
@AhmedNadar 3 жыл бұрын
Like your shoplify store 😀👍🏼
@androidpearl798
@androidpearl798 3 жыл бұрын
Excellent, Super easy, will implement it now :) Thank you.
@pablom375
@pablom375 3 жыл бұрын
thanks for you content! Saludos desde Chile.
@SupeRails
@SupeRails 2 жыл бұрын
Hola Pablo! Gracias! A veces me dicen que hay que hacer videos en espanol tambien. Talvez un dia! :D
@pablom375
@pablom375 2 жыл бұрын
@@SupeRails ahí estaremos apoyando 🙌
@santuprajapati2203
@santuprajapati2203 2 жыл бұрын
Too good explanation of stripe checkout keep posted these kind of third party integration.
@NiyantaPrasad
@NiyantaPrasad Жыл бұрын
Really awesome video. Thank you so much!
@ridafatima9073
@ridafatima9073 2 жыл бұрын
THANKS ALOT! It saved me life 😃😃😃
@Sarev_
@Sarev_ 3 жыл бұрын
Really helpful, thanks a lot!
@therealpunitdh
@therealpunitdh 3 жыл бұрын
Hi, could you please help? The respond_to do |format| does not work in my Rails application. It throws an ActionController::UnknownFormat error.
@therealpunitdh
@therealpunitdh 3 жыл бұрын
@@SupeRails I just added Mime::Type.register "text/javascript", :js to the mime_types.rb file and restarted the server. Still the same error.
@SupeRails
@SupeRails 3 жыл бұрын
oh, I thoguht it was the wicked_pdf video. disregard the mime_type. respond_to do |format| format.js end should work in a rails app without any problems. maybe you mistyped? here are all the related code changes - maybe you missed or misspelled smth github.com/corsego/shoplify/commit/0011a727b1272fb96ae0d8b5618b67975fdf11a8
@blackswansurfing4405
@blackswansurfing4405 3 жыл бұрын
@@SupeRails Same problem here "ActionController::UnknownFormat in CheckoutController#create" i copied/paste your line code and added a new js mime_type
@blackswansurfing4405
@blackswansurfing4405 3 жыл бұрын
It was my fault, forget to add "remote: true" on the button_to
@SupeRails
@SupeRails 3 жыл бұрын
@@blackswansurfing4405 attention to details ;)
@purohitnikunj2069
@purohitnikunj2069 2 жыл бұрын
Nice Tutorial!!....But I am having one issue, When I am sending normal post request for 'BuyNow' button to my server and then "redirect_to @session.url" it is redirecting me to payment page but when I write remote:true in 'BuyNow' button and send Ajax request then it is rendering 'create.js.erb' template but not redirecting me to payment page....Can you help me with this??? First I am thinking that it may be cors error then I configured cors policy in my app but still it isn't working so Please help me with this
@andrewkancev6035
@andrewkancev6035 2 жыл бұрын
It's very great. But when i press "Buy now!" it not redirect me to Checkout page for pay, it's render root path. In console i get: Completed 406 Not Acceptable ActionController::UnknownFormat I don't understand why. I 10 times check all code from start to 28 minutes of video
@SupeRails
@SupeRails 2 жыл бұрын
do you have this problem on a rails 6 app, or rails 7?
@andrewkancev6035
@andrewkancev6035 2 жыл бұрын
@@SupeRails Rails 7.0.3
@johnedelmapa
@johnedelmapa 3 жыл бұрын
This is great! Thank you!!
@fugeeohu9357
@fugeeohu9357 2 жыл бұрын
Is Checkout actually under the classification API ?
@francodiaz8439
@francodiaz8439 3 жыл бұрын
Hi, I'm also using AWS in my credentials, and I add below the AWS the stripe credentials but then it doesn't work is possible to use both?, thanks a lot
@kwametcu4761
@kwametcu4761 3 жыл бұрын
This is great. I have been following along trying to replicate this in a project I'm working on but for some reason, the buy now button has to be clicked at least 3 times before it redirects to the Stripe payment interface. I've used both link_to and button_to but still the same result. Could you possibly have some insight into why it's behaving that way, please?
@SupeRails
@SupeRails 3 жыл бұрын
It does usually take me couple of seconds to redirect to Stripe Checkout. If it takes a few CLICKS, check your browser console and rails console for errors.
@muhammadmudasir367
@muhammadmudasir367 3 жыл бұрын
in ahoy gem country and city data not showing in console ,please make a detail video ahoy gem
@SupeRails
@SupeRails 2 жыл бұрын
:0
@vivuuc4209
@vivuuc4209 3 жыл бұрын
So great video!
@satendragond6872
@satendragond6872 3 жыл бұрын
How can i create orders and show all oeders in table
@SupeRails
@SupeRails 3 жыл бұрын
You can get some inspiration from this app build based on the course: github.com/yugeshpalvai21/watchstore
@satendragond6872
@satendragond6872 3 жыл бұрын
@@SupeRails Thanks you help me lot
@w1d3r75
@w1d3r75 3 жыл бұрын
How much do you pay per month for that cloud9 ide?
@SupeRails
@SupeRails 3 жыл бұрын
I do 80% of my work on cloud9 and have 7-8 environments. It's around $10/month.
@w1d3r75
@w1d3r75 3 жыл бұрын
@@SupeRails nice. It's not as expensive as I thought. Nice content btw. I'm always cheering for new Rails stuff
@fugeeohu9357
@fugeeohu9357 2 жыл бұрын
You linked us to your shopify repository, that's not the same code as this video I'm forced to type it out from screen
@muhammadmudasir367
@muhammadmudasir367 3 жыл бұрын
when you feel free please make a video on ahoy
@SupeRails
@SupeRails 2 жыл бұрын
I've heard you the first time ;)
@haniqassim
@haniqassim 3 жыл бұрын
Great video !!!
@SupeRails
@SupeRails 3 жыл бұрын
Thanks Hani! Feel free to share it ;)
@MuhammadUmair001
@MuhammadUmair001 2 жыл бұрын
Thanks alot Sir
@saurabhsaini453
@saurabhsaini453 3 жыл бұрын
sir, please make videos tutorial on paypal in rails.
@SupeRails
@SupeRails 3 жыл бұрын
Hi! I'd love to, but I haven't found a good way to integrate Paypal without external dependencies like Braintree yet :(
@muhammadmudasir367
@muhammadmudasir367 3 жыл бұрын
please make a video ahoy gem
@SupeRails
@SupeRails 2 жыл бұрын
Hi Muhammad! Good idea! I'll put Ahoy on my TODO list
@muhammadmudasir367
@muhammadmudasir367 3 жыл бұрын
Hi sir
@SupeRails
@SupeRails 2 жыл бұрын
Yo! What's up?
@valcaro87
@valcaro87 2 жыл бұрын
i followed this tutorial and works fine, however if we have 3 different products having the same amount, for 'sales_count', Product.find_by(price: session.amount_total), is there any other reference attribute that returns a unique identifier? looking at the "payment_intent.succeeded" but there is no way for me to get the product_id (prod). any tips? thanks
@valcaro87
@valcaro87 2 жыл бұрын
i managed to worked on this, let me know if you have better approach, thanks. case event.type when 'checkout.session.completed' session = event.data.object line_items = Stripe::Checkout::Session.list_line_items(session.id) product = Product.find_by(stripe_product_id: line_items.data&.first&.price&.product) product.increment!(:sales_count) if product.present? end
One Time Payments With Pay And Stripe
39:24
GoRails
Рет қаралды 1,6 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 145 МЛН
Shopping Cart Order Sessions In Rails 7 With Turbo
26:21
Stripe Checkout in Rails with the Pay gem
17:49
GoRails
Рет қаралды 13 М.
Stripe Subscriptions with Rails 7
1:02:06
SupeRails
Рет қаралды 4,2 М.
Simple Ruby on Rails 5 REST API From Scratch
34:48
Traversy Media
Рет қаралды 154 М.
Rails 7: The Demo
34:15
David Heinemeier Hansson
Рет қаралды 109 М.
Pundit Gem For Authorization In Ruby On Rails 7
21:27
Deanin
Рет қаралды 8 М.
Payments Basics to ISO20022 - Live Session
1:44:54
Payments Domain
Рет қаралды 14 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,8 МЛН