my own actions after "stripe.checkout.session.completed" #698
Unanswered
francois0690
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
It seems this kind of question has been already asked but I don't really understand what I need to do.
I made a Rails 6 app, an AirBnB like application and I wrote the full web site logic for customer validation before Stripe payment process implementation.
Before Stripe, I had a
Booking
controller to rent a flat with thecreate
action that write all information needed in the booking table. (start_date, user_id, owner_id, price, nb_days, etc...)Nothing special here, I use basic Rails convention in the
create
like the code below:All is writen in Database correctly and the app works fine.
I tried to implement Stripe + Pay gem for "One Time" products only and It works fine but I don't understand where I must use my
create
function previously called in theBooking
controller.I naturally would like to put this logic in the
success
function of thecheckout
controller but I don't know (and I need to preserve my booking_params).I read that I should use 'pay.rb' initializers features, or 'metadata' or 'fullfilment' but there is nothing enough clear for my level.
Thanks for your help and thank you for the work on this!
Beta Was this translation helpful? Give feedback.
All reactions