I coded something like this on my site.., cirumventing any payment system from s2member.
What I’ve already done:
1) Customers register for Free
2) In the welcome page, I’ve put a “activate coupon” link, which takes customer to a custom form.
3) In the customer form they enter a coupon code and the appropiate level is set. I then modify the current user object and that updates s2member database.
Backend) I maintan a dabatabe with coupon expiration date, membership details, who has used it, who distributed it.. etc.
Benefit) This has helped me a lot for link building, as other blog writer can offer them to their readers.
I’m planning in adding the ability for customers buying gifts, so what I’m planning to do next is:
1) I will make customers buy a membership with a custom capability (say gifts).
2) With said capability, they’ll access a page were they can generate a coupon code once, and even email it.
the catch) I’ll need to make a new contact form for this with its corresponding php code, and also tweak my coupon database for it (e.g. a customer can only send 1 coupon).
Anyway… I’m happy to share the code and database structure for what I have today (free coupons), the code has average commenting to guide you… but I’m a beginner WordPress developer and in no way this has a UI for admins or is packaged as a plugin.. I maintain the code directly…