PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Possible to insert PayPal ID dynamically?

s2Member Plugin. A Membership plugin for WordPress®.

Possible to insert PayPal ID dynamically?

Postby bazchas » March 23rd, 2011, 11:20 am

Hi all,

I am looking to replace our own PayPal Pro solution with S2Member Pro. We have two uses for it.

The first requirement is to take subscription payment from our registered guests - seems to be a perfect fit and confident it will meet all of our needs.

The second requirement is to facilitate our subscribers taking deposit payments from their "guests" via PayPal Pro. These "guests" are not registered and they are merely buying a service from our subscribers.

Currently we just dynamically insert the registered subscribers PayPal email id (provided at registration) into the PayPal request at the time it is required and the guest can just pay using their credit card online via the PayPal pages with payment going directly to our subscribers PayPal account - we do not wish to take the money and have to pass it on.

Is it possible to do this with S2Member Pro? It looks as if I have to insert my PayPal email id in the WordPress Admin pages before it can be used? If so I am assuming this prevents me inserting the email dynamically depending on the subscriber? If this can be done are there any other considerations I will need to be aware of? It would be great if this could work with the other payment gateways too? I am hoping to just replace our custom PayPal Pro code with S2Member Pro.

Any help, assistance or redirection if already discussed will be appreciated.

Regards,

BazChas.
User avatar
bazchas
Registered User
Registered User
 
Posts: 20
Joined: March 23, 2011

Re: Possible to insert PayPal ID dynamically?

Postby Cristián Lávaque » March 23rd, 2011, 8:53 pm

Well, I'm not sure I understand correctly your question, but it sounds like you want to replace PayPal Pro with s2Member Pro.

Let me clarify that, s2Member will help you manage the access to content by members, but it's not a payment gateway, it works with them. It doesn't replace PayPal Pro, it uses it; as well as other gateways.

So s2Member would help you manage better the first use you mention, but you could leave the second use untouched if it's working for you as it is and you'll still need to use PayPal Pro.

Now, if you're talking about replacing PayPal Pro with another gateway, that is fine.

s2Member would still work for the first use you mentioned. Not taking the payment, but managing it using the gateway, and adjust access to content based on those transactions.

How you'd apply the other gateway for the second use, I don't know. This is not something s2Member may be easily involved with. If the gateway allows transfers between its users as PayPal does, then you could create a system similar to what you currently have.

Hope that helps.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Possible to insert PayPal ID dynamically?

Postby Jason Caldwell » March 23rd, 2011, 10:41 pm

Thanks for bringing this to my attention Cristián.

The PayPal® email address configured for s2Member
could be changed dynamically with this technique.


Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php

Inside the file, do something like this.
Code: Select all
<?php
add_filter 
("ws_plugin__s2member_options", "my_dynamic_s2_options", 15);
function my_dynamic_s2_options (&$options = array ())
    {
        $options["paypal_business"] = "paypal@example.com";
        /**/
        return $options;
    }
?>

That being said, there are many issues to consider when modifying things in this way. For example, this might work smoothly with PayPal Standard Buttons, but you'll probably need assistance from a developer if you intend to get this working with PayPal Pro integration.

For instance, with PayPal® Pro integration, you'll need to modify the API Username, Password, and Signature as well. Ugh. This could get VERY tricky for you; if not impossible.
Code: Select all
<?php
add_filter 
("ws_plugin__s2member_options", "my_dynamic_s2_options", 15);
function my_dynamic_s2_options (&$options = array ())
    {
        $options["paypal_business"] = "paypal@example.com";
        $options["paypal_api_username"] = "username";
        $options["paypal_api_password"] = "password";
        $options["paypal_api_signature"] = "signature";
        /**/
        return $options;
    }
?>

I would also make sure that you go over PayPal's terms of service carefully before doing anything like this. It seems a little shady from a certain perspective. At least, I can see why PayPal might consider it shady.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Possible to insert PayPal ID dynamically?

Postby bazchas » March 24th, 2011, 3:18 am

Thank you for your prompt replies, much appreciated. Your response Jason is what I am looking for and we will explore from there.

We are not doing anything shady, and we do not believe it would be interpreted as such by PayPal. There any many many examples of online businesses that do this. We provide a reservation service to our subscribers which enables them to take deposit and balance payments from their guests via our hosted platform. We do not wish to get involved in the money transfer process so they consent to us passing their PayPal email to take the payment and their guests only see the subscribers branded pages and subscribers PayPal. In a way we are no more than their "web developers" but rather than have to host each site separately with separate instances of S2Member for each we wish to use Wordpress and S2Member/Pro to centralise the process and provide their PayPal email dynamically. I hope that clarifies our use of PayPal?

I am assuming that if we wished to offer any of the other payment gateway options we would create a similar options array to pass through?

Thanks again,
Regards,
BazChas.
User avatar
bazchas
Registered User
Registered User
 
Posts: 20
Joined: March 23, 2011

Re: Possible to insert PayPal ID dynamically?

Postby Jason Caldwell » March 24th, 2011, 4:06 am

Thanks for the follow-up.
~ much appreciated.

I am assuming that if we wished to offer any of the other payment gateway options we would create a similar options array to pass through?

Yes, you are correct. You'll find the options for the other gateways inside the s2Member Pro source distribution. Specifically inside /s2member-pro/includes/syscon.inc.php.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Possible to insert PayPal ID dynamically?

Postby bazchas » March 24th, 2011, 4:27 am

Thanks again Jason. For an "unofficial support channel" the response has been fantastic. I look forward to using your product in our solution.
User avatar
bazchas
Registered User
Registered User
 
Posts: 20
Joined: March 23, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron