ruby on rails - how to refresh a page after receiving webhook from stripe -


i using stripe creating payments. after payment done user redirected payment status page. payment status page supposed show latest plan user has subscribed for. problem webhook stripe after sometime updates user plan table. user redirected user plan page after payment.

how can show updated status after user redirected. there way halt redirect till webhook request complete

there should no need on end wait webhook event arrive before updating customer here. stripe api calls synchronous means when create charge either error indicates payment failed or charge object indicates payment succeeded. depending on can update customer without having wait event reach you.

the same logic applies new subscription here when create 1 subscription object indicating successful , can update database before redirecting customer.

most events should seen way verify information have on end , make sure data date , not validate charge , update customer directly.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -