I’ve been working on a system for adoptions for charity using S2member pro. it relies on ccaps to allow users to view their adopted animal content. Each animal is created as a custom post type and with any posts tagged with a category with the same slug as the custom post type. This way i can control what the user sees depending on which ccaps they have. for example if they have adopted JOEY animal then they will have access to any posts categorized as JOEY. The adoption process works like a charm and payments work great.
When a user tries to add another animal, say BOBBI, I’d like this animal to be added to the existing adoption and the monthly donation amount to be increased. As far as I understand modifying the original recurring subscription (adoption) isn’t possible unless the user modifies that in paypal. But using the Paypal Subscription Modification Button I can modify the subscription with completely new terms (i hope that’s right). So my button reads this now:
<?php echo do_shortcode('[s2Member-PayPal-Button modify="1" level="1" ccaps="joey,bobbi" desc="Testing adoption modification for Joey, Bobbi" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="mysite.org" ta="0" tp="" tt="D" ra="0.02" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" success="mysite.org/my-dashboard/" /]'); ?>
The button seems to work to expectations, I process my order on paypal and it looks like everything is in order. My $0.01/month for JOEY is updated to $0.02/month for JOEY and BOBBI. After finishing my transaction i get to that awful grey screen that says:
Thank you! ( you MUST check your email before proceeding ).
* Note: It can take ( up to 15 minutes ) for Email Confirmation with important details. If you don’t receive email confirmation in the next 15 minutes, please contact Support.
Check Your Email ( Then Click Here )
Of course i get nothing from mysite.org in my email so basically this becomes a dead end for the user. I do however receive my paypal notification that my subscription has been modified (so this part is good). Checking the IPN log I can see that my transaction has gone through and it’s received all the relevant variables but i get this:
0 => 'IPN received on: Tue Dec 11, 2012 8:58:12 am UTC',
1 => 's2Member POST vars verified through a POST back to PayPal®.',
2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
3 => 's2Member `txn_type` identified as ( `subscr_modify` ).',
4 => 'Unable to modify Subscription. Could not get the existing User ID from the DB.',
So item 4 tells me that s2member is having troubles understanding WHO this subscription mod if for (am i translating that correctly?). Yes I am logged in while i’m beginning this transaction. Any insight from the amazing wizards at S2member? Could use some help, this has been plaguing me for long enough.