Small Issues Regarding Custom Gateway

1. Catching the Results Gateway

I copied the paypal gateway. The gateway generates a return url that looks something like this: http://mydomain.com/paymentreturn/mygateway

I know there is a function that handles this in the paypal gateway, ‘ handle_paypal_return()’. The problem is, in my gateway, my function to handle the results is not working. Perhaps I missed out a hook somewhere.

Please help.

Thanks.

**

2. Creating the gateway as a plugin

I just copied the paypal gateway (in the memberships plugin). I would like to package it as a seperate so that it doesn’t disappear when updating membership.

How can I do this? is there a do_action I can hook into? or a function I should call?

I know there is a ‘M_register_gateway()’ is this the one to use in a plugin?