Building my own gateway, question about actions.

I’m building a new payment gateway for the membership plugin and I’m modeling it after the paypal express gateway. I’m not an expert on the WP architecture yet, but I’m picking my way through. The question I have is regarding the actions that are called in the handle_paypal_return hook. For instance, membership_payment_denied is called when the gateway responds with a payment denial code. What I’d like to do is return my users to the subscription form with an error message. I’m assuming that I would need to write a hook for this action, but where is the proper place to do this? Based on what I see, these action calls are all placeholders with no implementation, so I’m kind of stuck with where to go next.

Another question I have is where is the user taken/what do they see once that hook completes execution? Is the do_subscription_shortcode method of the membershippublic class executed?

Thanks!