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.

Member Point System

Home Forums Community Forum Member Point System

This topic contains 9 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 9 months ago.

Topic Author Topic
Posted: Thursday Mar 29th, 2012 at 2:49 am #9426
Angela Zou
Username: angelaz

Hi, I want to implement some member features of S2member for a booking site. I need some opinion about how to approach this.
1- Members can book rooms/reservations and pay using S2member gateways (plugin built-in)
2- Point system to reward users. When users book a room, they get X points (I think I can use an invisible, uneditable profile field for this. And when a purchase is made [notification API], I can write a simple script to update the field value through queries)
3- Rooms can be booked if enough points has been earned (check if user has enough points before allow them to book a room for free)

I just want to confirm, is this the right way to go? Have there been similar implementation or request that I can reference?

Thanks,
Angela

PS: are there any SMS gateways that S2member plan to integrate with?

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Thursday Mar 29th, 2012 at 2:56 am #9429
Angela Zou
Username: angelaz

In addition, I also have a thought for Alipay gateway. Since it doesn’t support recurring payments, I was wondering if I can use S2member to create an account balance feature? This way, users can charge up their S2member account with X RMB, and let it deduct every month rather than ask the user to pay every month. (Returning the amount is currently not a very important feature, I can set up a form for user to fill and return the money manually.)

Posted: Thursday Mar 29th, 2012 at 7:05 pm #9506
Raam Dev
Username: Raam
Staff Member

Hi Angela,

Assisting with custom features is outside the scope of our support policy (see s2Member® » Support Policy » Outside Scope).

I have not come across any requests for a similar integration that I can point you to, however it sounds like your method may work. I also don’t know of any current plans to integrate with an SMS gateway, but that may change at some point.

Regarding the account balance feature: Your feature request has been noted. Thank you!

Posted: Wednesday Apr 4th, 2012 at 4:44 am #10020
Angela Zou
Username: angelaz

As for the account balance, if it’s not going to be available anytime soon, can you suggest some workarounds or hacks? Thanks

Posted: Wednesday Apr 4th, 2012 at 2:55 pm #10057
Raam Dev
Username: Raam
Staff Member

An Account Balance feature would require integration with the payment gateway, so such a customization would likely require more than a hack. The simplest approach would be to create an extra custom field and simply store the balance amount there. You’d have to manually update it whenever someone wants to add to their balance, but as I said, integrating this with a payment gateway would be an entire feature unto itself, not a simple hack.

Posted: Thursday Apr 5th, 2012 at 7:20 am #10139
Angela Zou
Username: angelaz

but every time the user finishes the payment, they would return to the website. (I’m only concerned about the Alipay gateway.) Doesn’t the URL keep some information (like how much they’ve charged) so I can use the appropriate hook/filter to update that information to the custom field value?

Posted: Thursday Apr 5th, 2012 at 10:10 pm #10213
Raam Dev
Username: Raam
Staff Member

Hi Angela,

I believe the return page does not include the payment information. If I’m not mistaken, that information is sent to s2Member via the back-end. However, you may want to look at the documentation on Dashboard -› s2Member® -› AliPay® Options -› Return-Page Template and see if that helps.

Posted: Friday Apr 6th, 2012 at 1:15 am #10228
Angela Zou
Username: angelaz

Well, you mentioned that it’s gonna be send to S2member, right? So then, all I need is a filter/hook to grab a copy of the information and update the custom field.

Posted: Friday Apr 6th, 2012 at 11:26 am #10244
Raam Dev
Username: Raam
Staff Member

Unfortunately, I don’t believe the are any hooks/filters for the AliPay gateway:
http://www.s2member.com/codex/stable/s2member/alipay/package-filters/

I’m not entirely sure why that is, but I’ll send a message to Jason to see if he can offer any insight. Thank you for your patience.

Posted: Friday Apr 6th, 2012 at 3:10 pm #10252
Staff Member

All of the post-processing routines for AliPay are ultimately handled by s2Member’s core PayPal IPN processor, as they get piped into the core PayPal processor after some initial handling that is specific to AliPay. So while there are no Hooks/Filters specifically for AliPay, there are MANY Hooks/Filters available within the PayPal core processor that can be used to grab this information.

Here is a quick example…
/wp-content/mu-plugins/s2-hacks.php

<?php
add_action('ws_plugin__s2member_during_paypal_notify_after_subscr_signup', 'my_info_grabber');
function my_info_grabber($vars = array())
	{
		if($vars&#91;'paypal'&#93;&#91;'subscr_gateway'&#93; === 'alipay')
			{
				print_r($vars); // An array of all transaction details.
			}
	}
?>

There are many other Hooks/Filters available through these files…
/s2member/includes/classes/paypal-notify-in…php

Viewing 9 replies - 1 through 9 (of 9 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.