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.

Minimum payment for "pay what you want?"

Home Forums Community Forum Minimum payment for "pay what you want?"

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

Topic Author Topic
Posted: Friday Jan 11th, 2013 at 12:41 pm #37025
Daniel
Username: cookiemobsta

Based on the advice elsewhere in the forums, I’ve configured S2Member to provide a “pay what you want” paypal button.

However, is there any way to provide a minimum payment? For instance, if I want people to pay at least $1, is there any way to set it up so that the button will reject their payment if it is below a certain amount?

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Saturday Jan 12th, 2013 at 4:06 pm #37179
Eduan
Username: Eduan
Moderator

Hello Daniel,

That’s certainly possible to setup. Take this button here and then add your own JavaScript so that it doesn’t let the button click go through, until the user pays over that amount.

– Eduan

Posted: Saturday Jan 12th, 2013 at 4:14 pm #37181
Daniel
Username: cookiemobsta

Unfortunately, I don’t know a lick of code. I’ll see if I can rustle up one of my developer friends to help me — unless the code was easy and something you could whip up in a few minutes?

Also, would this plugin be appropriate for including the javascript in my WordPress page? http://wordpress.org/extend/plugins/insert-javascript-css/

Posted: Sunday Jan 13th, 2013 at 4:18 am #37227
Staff Member

Thanks for the heads up on this thread :-)

Based on the advice elsewhere in the forums, I’ve configured S2Member to provide a “pay what you want” paypal button.

However, is there any way to provide a minimum payment? For instance, if I want people to pay at least $1, is there any way to set it up so that the button will reject their payment if it is below a certain amount?

Can you please point me to the forum post where you obtained this code fragment/example? Once I see what you’re working with, I can offer you some advice on how to implement this last bit you’re looking for. Thanks!

Posted: Wednesday Jan 16th, 2013 at 11:21 pm #37843
Daniel
Username: cookiemobsta

I’m using the advice in this link: http://www.primothemes.com/forums/viewtopic.php?f=4&t=16566&p=59040#p59040

Namely, I’m changing the value of “amount” from “hidden” to “text.”

How would I tie this in with a minimum payment?

And is there any chance a later release of S2Member might incorporate pay what you want built in? I can see there being a lot of demand for this.

Posted: Thursday Jan 17th, 2013 at 4:34 pm #37938
Staff Member

Thanks for your reply :-)

Find this portion of your Button Code please.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

Add this JavaScript check if you like. Adding an onsubmit JavaScript handler to the FORM tag.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="if(Number(document.getElementsByName('a3')&#91;0&#93;.value) < 1.00){ alert('Must be greater than $1.00 please.'); return false; }">

Result looks like, functions like, this…


And is there any chance a later release of S2Member might incorporate pay what you want built in? I can see there being a lot of demand for this.

Definitely :-)

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