I have an action which is actually used as a return-url
from my payment gateway
. So for making it work I set
protect_from_forgery with: :null_session, only: [:verify_payment]
def verify_payment
data={}
params.each do |name, value|
data[name]=value
end
booking=Booking.find(params['booking'])
if booking.charge_card(data)
redirect_to booking_confirmation_path(booking: data["booking"]), success: "these wont show"
else
redirect_to booking_summary_path(booking_id: data["booking"]), error: "these wont show"
end
end
could some one tell me why the flash wont work on redirect
?
flash.empty?
will return true
after redirect..why is that?
But if I render it will work..