latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

handling billing updates

Home Forums Community Forum handling billing updates

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 3 years, 8 months ago.

Topic Author Topic
Posted: Sunday May 5th, 2013 at 10:05 pm #49251
jt22
Username: yoda22

I’m wondering what is the best method for handling changes to a users account when they complete a “Billing Update” form (meaning they are modifying their payment information)?

The scenario is, when a users payment can’t be processed through Paypal, they are suspended and I am emailed about it. I then edit that users custom capabilities and add one I created that’s called “update_billing”. I have PHP checking for that capability when a user logins and it will direct them to Update Billing Form provided by s2member.

If they then update their billing information, I need to take actions to automate the process of getting their account “active” again. At this point, they’ll still have the custom capability of “update_billing” and they’ll be redirected to the form once again.

So, for now, I am notified from Paypal via an email that the user has modified their profile and then I manually go in and remove the custom capability from their account.

Given my current setup, it would be ideal if I could add a custom capability to the Update Billing Form (something like “billing_updated”) and then include it into my PHP script to say if they have that capability then go ahead and let them in.

OR, is there a more integrated method that I missing out on that handles such a scenario directly?

Thanks,
Joe

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Monday May 6th, 2013 at 11:07 pm #49330
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

OR, is there a more integrated method that I missing out on that handles such a scenario directly?

You could hook into s2Member’s Billing Update routine and use the information provided here to take the Custom Capability away.

See: Knowledge Base » Changing Roles/Capabilities via PHP

The best way to do this is to check the global reference to see if s2Member did an update on a User. If you’re using PayPal something like this should work:

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.