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™

Paypal Button Drop Down

s2Member Plugin. A Membership plugin for WordPress®.

Paypal Button Drop Down

Postby traebonne » May 27th, 2011, 6:14 am

Hi there,
I hope you can help me. I have searched through this forum and found a couple of threads which go some way to answering my question, but as a coding novice I still need some advice...

I want to create a Paypal drop down selector to allow customers to pay for membership either monthly £9.99 or annually £47.99 (I would put in 6 monthly if I could, but it seems that Paypal & s2member don't allow this?) for the same subscription type. I generated the Paypal code, which is hosted by them (I can't change this in stage two of the papal button creation process - it's greyed out):

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="6CPYKY95ZUZ7N">
<table>
<tr><td><input type="hidden" name="on0" value="Payment Options">Payment Options</td></tr><tr><td><select name="os0">
   <option value="Monthly Membership">Monthly Membership : £9.99GBP - monthly</option>
   <option value="Annual Membership">Annual Membership : £47.99GBP - yearly</option>
</select></td></tr>
</table>
<input type="hidden" name="currency_code" value="GBP">
<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_GB/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>


And inserted the following text...

<table>
<tr><td><input type="hidden" name="on0" value="Payment Options">Payment Options</td></tr><tr><td><select name="os0">
<option value="Monthly Membership">Monthly Membership : £9.99GBP - monthly</option>
<option value="Annual Membership">Annual Membership : £47.99GBP - yearly</option>
</select></td></tr>
</table>

into the s2member button:

Code: Select all
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="business" type="hidden" value="accounts@base1music.com" />
<input name="cmd" type="hidden" value="_xclick-subscriptions" />
<!-- Instant Payment Notification & Return Page Details -->
<input name="notify_url" type="hidden" value="http://www.base1music.com/?s2member_paypal_notify=1" />
<input name="cancel_return" type="hidden" value="http://www.base1music.com/" />
<input name="return" type="hidden" value="http://www.base1music.com/?s2member_paypal_return=1" />
<input name="rm" type="hidden" value="2" />
<!-- Configures All Of The Checkout Fields -->
<input name="no_shipping" type="hidden" value="1" />
<input name="no_note" type="hidden" value="1" />
<input name="custom" type="hidden" value="www.base1music.com" />
<input name="currency_code" type="hidden" value="USD" />
<input name="page_style" type="hidden" value="paypal" />
<table>
<tr><td><input type="hidden" name="on0" value="Payment Options">Payment Options</td></tr><tr><td><select name="os0">
   <option value="Monthly Membership">Monthly Membership : £9.99GBP - monthly</option>
   <option value="Annual Membership">Annual Membership : £47.99GBP - yearly</option>
</select></td></tr>
</table>
<input name="item_number" type="hidden" value="1" />
<!-- Identifies/Updates An Existing Member After Checkout -->
<input name="on0" type="hidden" value="&lt;?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?&gt;" />
<input name="os0" type="hidden" value="&lt;?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?&gt;" />
<input name="modify" type="hidden" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<!--<input type="hidden" name="amount" value="0.01" />-->
<input name="src" type="hidden" value="1" />
<input name="sra" type="hidden" value="1" />
<input name="a1" type="hidden" value="0.00" />
<input name="p1" type="hidden" value="0" />
<input name="t1" type="hidden" value="D" />
<input name="a3" type="hidden" value="0.01" />
<input name="p3" type="hidden" value="1" />
<input name="t3" type="hidden" value="M" />
<!-- Displays The PayPal® Image Button -->
<input style="width: auto; height: auto; border: 0;" alt="PayPal®" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" type="image" />
</form>


This displays really well:
paypaldropdown_img.jpg
paypaldropdown_img.jpg (22.19 KiB) Viewed 1782 times


but when I click on the button it returns this message on the paypal url:
paypalresult_img.jpg


Please advise. Really not sure how to work this and desperate to get it up and running (need explicit instructions as a coding novice please).

Thanks in anticipation,
Trae :?

NB: I am running WP 3.1.3 and s2member 3.5.8 (Theme is Dynamix)
User avatar
traebonne
Registered User
Registered User
 
Posts: 6
Joined: May 13, 2011

Re: Paypal Button Drop Down

Postby beetle » May 27th, 2011, 6:25 am

hi,

i'm not an experienced user but I remember seeing that if you have enabled encrypted payments through paypal you need to have checked the "Enable Button Encryption?" option in your Paypal Options > Paypal Account Details tab.
User avatar
beetle
Registered User
Registered User
 
Posts: 27
Joined: May 26, 2011

Re: Paypal Button Drop Down

Postby traebonne » May 27th, 2011, 10:51 am

Thanks beetle,
Will have a look :roll:
User avatar
traebonne
Registered User
Registered User
 
Posts: 6
Joined: May 13, 2011

Re: Paypal Button Drop Down

Postby openmtbmap » May 27th, 2011, 3:37 pm

please post back if it works, I desperately need a dropdown button too. I got s2member pro, but without paypal pro s2member pro is more or less useless, as I cannot use the forms.
User avatar
openmtbmap
Registered User
Registered User
 
Posts: 32
Joined: May 1, 2011

Re: Paypal Button Drop Down

Postby Cristián Lávaque » May 28th, 2011, 1:27 am

openmtbmap wrote:please post back if it works, I desperately need a dropdown button too. I got s2member pro, but without paypal pro s2member pro is more or less useless, as I cannot use the forms.


You can use the s2Member Pro-Forms for PayPal without PayPal Pro. WP Admin -> s2Member -> PayPal Pro-Forms -> Quick-Start Guide For PayPal Pro

*PayPal® Pro is NOT Absolutely Required* s2Member is very flexible. It is now possible to integrate Pro Forms without a PayPal® Pro account, whereby the enhanced Form Shortcodes that s2Member provides can be integrated ONLY with PayPal® Express Checkout. In other words, if you get declined for PayPal® Pro service, you can still use s2Member Pro Forms. Ask PayPal® to activate Express Checkout for you. ( it's free ). Once Express Checkout is enabled, you will have access to your PayPal® API Credentials. Log into your PayPal® account, and navigate to Profile -> Request API Credentials. You'll choose ( PayPal® API ), and then choose ( Create Your Own ). Now ... here is the tricky part; whenever you generate a Pro Form Shortcode with s2Member, be sure to change accept="paypal,visa,mastercard,amex,discover,maestro,solo" to just accept="paypal"; thereby excluding the on-site credit card processing functionality; which is available only with PayPal® Pro.


This thread may also be helpful viewtopic.php?f=36&t=2634
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: Paypal Button Drop Down

Postby Cristián Lávaque » May 28th, 2011, 1:37 am

traebonne wrote:Thanks beetle,
Will have a look :roll:


Beetle is right. You'll get that error if you configured PayPal to use encrypted buttons, but then don't have your button encrypted. s2Member has a setting for this here WP Admin -> s2Member -> PayPal Options -> PayPal Account Details -> Enable Button Encryption


Regarding changing the options for your button, I don't know the code you have now does the trick, let us know after you try without the encryption error.

The dropdown will just normally just change one field, but your options affect more than one field: amount and how often. You will need JavaScript to adjust the form dynamically based on the choice. This post by Jason may give you some ideas viewtopic.php?f=36&p=1342#p1342

If you need help to get this to work, you can find developers in freelance website, http://jobs.wordpress.net for example.

I 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: Paypal Button Drop Down

Postby traebonne » May 29th, 2011, 4:50 am

Thanks for your reply Cristian,
Ok as an alternative, if I generate two different button shortcodes through the s2member paypal button for level #1, one for monthly membership at £7.99 and one for annual membership at £47.99 and place them on membership options page with explanation, will this work as far as paypal is concerned?
:?
User avatar
traebonne
Registered User
Registered User
 
Posts: 6
Joined: May 13, 2011

Re: Paypal Button Drop Down

Postby Cristián Lávaque » May 29th, 2011, 11:14 am

Yes, if you create a separate button for each option, it won't be a problem. :)
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: Paypal Button Drop Down

Postby traebonne » May 30th, 2011, 5:22 am

Thank you Cristián, then this is what I will do for the time being. I would be very interested in learning of any update Primo makes to the s2member plugin which allows a dropdown which affects more than one field (i.e. term and price). Thank you again for your help :)
User avatar
traebonne
Registered User
Registered User
 
Posts: 6
Joined: May 13, 2011

Re: Paypal Button Drop Down

Postby Cristián Lávaque » May 30th, 2011, 12:45 pm

Cool. :)

I'll mention that request to Jason, I've seen it needed before too.
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


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron