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™

need help with encrypted button - REPOST from one month ago

s2Member Plugin. A Membership plugin for WordPress®.

need help with encrypted button - REPOST from one month ago

Postby NickFox » October 19th, 2010, 12:34 am

This is a repost from one month ago, I still need an answer.

This is a followup to a previous post where you suggested I create encrypted buttons. I've been studying the PayPal site and have been comparing the PayPal generated buttons to the s2Member generated buttons (by turning encryption off). I have found 2 things that I'm not sure how to deal with:

1) When I generate a PayPal button, I added rm=2 to the advanced variables to match s2Member, the generated code then has rm=1 AND rm=2. Not sure how to fix that...

2) How do I add the os0 field to the encrypted button code? Can I simply add the field like this?

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="JF7HAQZ34UAZC7Y">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

and I need some verification whether I'm doing this right or not. I did read the long thread on encryption. My button is only available to people who are wordpress subscribers so I am doing a modification from level 0 to level 1. Are these the correct advanced variables for that button:

page_style=MyCustomPage
custom=www.mywebsite.com
notify_url=http://www.mywebsite.com/?s2member_paypal_notify=1
rm=2
on0=Updating Subscr. ID
modify=1
sra=1

thanks
Nick
User avatar
NickFox
Registered User
Registered User
 
Posts: 12
Joined: July 15, 2010

Re: need help with encrypted button - REPOST from one month

Postby Jason Caldwell » October 23rd, 2010, 12:21 am

Excellent questions. Thanks for your patience Nick.
1) When I generate a PayPal button, I added rm=2 to the advanced variables to match s2Member, the generated code then has rm=1 AND rm=2. Not sure how to fix that...
Sorry, I was unable to reproduce this bug with PayPal's button generator. That being said, I don't think you'll have a problem with this. The rules of POST data variables dictate that the last variable value sent is the one used. So as long as rm=2 comes AFTER rm=1 you're good.

2) How do I add the os0 field to the encrypted button code? Can I simply add the field like this?
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="JF7HAQZ34UAZC7Y">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Yep, that will work just fine. However, you'll want to deal with the on0 variable the same way.
Code: Select all
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="JF7HAQZ34UAZC7Y">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
* Also see this interesting article. https://www.x.com/people/PP_MTS_Haack/b ... ed-buttons

and I need some verification whether I'm doing this right or not. I did read the long thread on encryption. My button is only available to people who are wordpress subscribers so I am doing a modification from level 0 to level 1. Are these the correct advanced variables for that button:

page_style=MyCustomPage
custom=www.mywebsite.com
notify_url=http://www.mywebsite.com/?s2member_paypal_notify=1
rm=2
on0=Updating Subscr. ID
modify=1
sra=1

Remove ( on0=Updating Subscr. ID ). Otherwise, it looks good. Also make sure you supply PayPal with the Item Number. Upgrading to Level 1 means your Item Number should be = 1. PayPal will ask you for this during button generation. Just type in the number 1.
~ 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


Return to s2Member Plugin

Who is online

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

cron