After log in, a customer can go to his profile by clicking his mail adress on the lop left of the screen.
<div class="container">
<h3>Account for <%= current_user.email %></h3>
<% if @subscription.active %>
subscribed
<% else %>
<%= render 'form' %>
<% end %>
</div>
If the customer is subscribed he get's the message subscribed, otherwise he gets the Stripe payment form. When the payment is accepted. The redirection method in users_controllers#charge which is redirect_to users_info_path doesn't seem to reload html properly. If the browser is refreshed (F5), then the html is also refreshed.
def charge
paymentMethodId = params["paymentMethodId"]
# Create subscription
redirect_to users_info_path
end
I can see the new subscription on my Stripe dashboard. The problems seems to be that I can't redirect with a redirect_to. I have tried other methods but with no success.
After log in, a customer can go to his profile by clicking his mail adress on the lop left of the screen.
If the customer is subscribed he get's the message
subscribed, otherwise he gets the Stripe payment form. When the payment is accepted. The redirection method inusers_controllers#chargewhich isredirect_to users_info_pathdoesn't seem to reload html properly. If the browser is refreshed (F5), then the html is also refreshed.I can see the new subscription on my Stripe dashboard. The problems seems to be that I can't redirect with a
redirect_to. I have tried other methods but with no success.