I just got Membership up and working and booyaa! It's working just like I hoped it would. However, I need to store a few extra fields of information about each subscription. I would store them as user_metadata, but they need to be on a subscription by subscription basis, not per user.
I have a separate table to store everything, but I'm not sure of the best method to link it to the subscription. I'm going to tie it to the rel_id column of the wp_[blogid]_m_membership_relationships table, so it has to be after the subscription is successfully signed up.
1. Create my record before and try and hook it all in somewhere when paypal calls back to Membership to activate the subscription. I would have to send something to paypal and back.
2. I could just send the extra fields to paypal and then create the record as paypal calls back and activates the subscription.
3. Create the record and tie it to the subscription record before it goes to paypal if the subscription record is created after step #1. (It doesn't look like it is)
Is there a proper way to customize the screens or paypal links to send extra data to be returned? Is there a way to customize the activation process when paypal calls the notify_url?
I'm sure I could hack this any number of ways, but I'd like to modify Membership as little as possible. So far I can't even find where the code for do_action('membership_payment_processed' .... is. Any suggests on the best way to do this would be great. Even just where the do_action hooks are processed.
I also tried doing a ping. First I don't think I will get the information I need and second my test ping didn't work. I found this in the apache logs:
[Sun Jul 10 02:03:37 2011] [error] [client 220.127.116.11] PHP Fatal error: Call to undefined function apply_filter() in /home/highfive/public_html/wp-content/plugins/membership/membershipincludes/classes/class.ping.php on line 326