Page 1 of 1

Manually adding members via php with 3rd party gateway

PostPosted: June 29th, 2011, 11:47 pm
by StenCade
OK, before I dive into any more code I just wanted to see if this would work/is a good idea.

I want to use Zombaio as my billing company. They have some example code on their website (https://www.zombaio.com/developer_sdk.asp) for integrating with Wordpress (pretty simple). Basically Zombaio makes calls to this script (add.user, delete.user) and the script manually adds/deletes users from the Wordpress database. That's it. I may go in there and change it to demote the user instead, saving the settings in case they decide to sign up again, but i think that's all the sophistication I probably need.

For registration I have the option of either using a form on my site with some of the basic variables (user, password, etc) which then gets posted to Zombaio's sign-up site to finish the process, or I can just skip that and link my join button to Zombaio (which then handles everything and sends back a call to add.user if all goes well).

So here's what I'm thinking: I could just keep wordpress registration disabled, link my join button straight to Zombaio and let the script handle everything registration-related, eliminating the need for s2member/Wordpress to handle user registration at all.

So am I missing something obvious or does this make sense? Is there anything that seems out-of-date in their provided Wordpress script or any extra variables that s2member needs or should be added to the database? I'm comfortable modifying that script if I need to.

Thanks in advance for any advice you can give me! I'm continually impressed with the support here and I'm definitely going to be giving a donation once we launch. :D

Re: Manually adding members via php with 3rd party gateway

PostPosted: June 30th, 2011, 2:05 am
by Cristián Lávaque
Your approach seems sound. I haven't looked at the script, but if they're updating it, it should work with the current WordPress. Unless you have s2Member custom registration fields, registration is WordPress default except for the role and EOT assignments.

You say the gateway would take care of the EOT too, for demotion you'd need to make just change the role to Subscriber. Role for new accounts will be Subscriber by default (Level 0), so if you would need to have it set the role to s2Member Level 1 when they pay.