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™

How can I use the paypal generated code outside wordpress?

s2Member Plugin. A Membership plugin for WordPress®.

How can I use the paypal generated code outside wordpress?

Postby surfries » May 19th, 2010, 1:08 am

I hope someone can help me with this.

I want to use my entire wordpress site as the members area. It will just have 1 level for access to the entire wordpress site. So, my question is can I take the generated paypal code for my level1 membership and place it on a page outside of my wordpress site and still have it generate the users info and give them access to my wordpress membership site?

e.g. / wordpress site (membership.site.com) - Buy Now s2member generated paypal script page outside wordpress (site.com)

Thanks...
User avatar
surfries
Registered User
Registered User
 
Posts: 2
Joined: May 19, 2010

Re: How can I use the paypal generated code outside wordpres

Postby Jason Caldwell » May 19th, 2010, 2:51 am

Yes, that is possible. However, you'll need to use the Full Button Code ( not the Shortcode ), and you'll need to remove the two PHP tags in the Full Button Code. The two PHP tags are references to s2Member API Constants, which would not be available outside of WordPress®. Not a huge deal though. Those two PHP tags are only designed to handle Subscription Modifications.

So you might have something like this on your external site:
Code: Select all
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="xxxxxxxxxxxxxxxxxxxx" />
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="notify_url" value="http://www.example.com/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://www.example.com" />
<input type="hidden" name="return" value="http://www.example.com/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<!-- Configures All Of The Checkout Fields -->
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="www.example.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="item_name" value="Bronze" />
<input type="hidden" name="item_number" value="1" />
<!-- Identifies/Updates An Existing Member After Checkout -->
<input type="hidden" name="on0" value="" />
<input type="hidden" name="os0" value="" />
<input type="hidden" name="modify" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<!--<input type="hidden" name="amount" value="0.01" />-->
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="a3" value="0.01" />
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="M" />
<!-- Displays The PayPal® Image Button -->
<input type="image" alt="PayPal®" style="border:0;" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" />
</form>

If you'd like the full details regarding those two PHP Constants that need to be removed for this to work, see: s2Member -> API Scripting -> Constants. Look toward the very bottom for documentation on the ON0|OS0 Constants.
~ 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: How can I use the paypal generated code outside wordpres

Postby surfries » May 22nd, 2010, 7:02 am

Perfect! That's what I thought just wasn't sure about those ON0 / OS0 codes.

Thanks for the fast reply..
User avatar
surfries
Registered User
Registered User
 
Posts: 2
Joined: May 19, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 3 guests

cron