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.

Custom Amount?

Home Forums Community Forum Custom Amount?

This topic contains 5 replies, has 2 voices. Last updated by  Bruce 3 years, 4 months ago.

Topic Author Topic
Posted: Sunday Aug 18th, 2013 at 5:37 pm #56117

Hi all-

I’ve been trying nearly every solution I could find in the forums but I just can’t get this working. I bought the Pro version of the plug-in after reading in the forums that this was possible.

A few specs: I’m running version 130816 of the plug-in on WordPress 3.6. My client does have Paypal Payments Pro.

Continuing… I have a client that wants to accept donations, both as either one-time or recurring monthly. The Paypal Pro-Forms look great except I’d like to be able to insert a field to accept a custom dollar amount. In theory, this seems like it should be a simple thing but I’ve been hitting walls all day.

Can anyone point me to some recent documentation that might have escaped my searching or perhaps get me going in the right direction?

Many thanks!

Andrea

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Tuesday Aug 20th, 2013 at 6:44 pm #56293

Sorry if bumping isn’t protocol… just trying to get an answer and I see that mods have been active on the forums since this was posted.

A little help, please?

Posted: Wednesday Aug 21st, 2013 at 2:24 am #56321
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

The best way to do donations is to use the HTML-style buttons for PayPal. You can have Users input a custom amount that way. There’s a good Post here by Raam that details how you can do this:

http://www.s2member.com/forums/topic/can-s2member-accept-donations-for-non-profits/

Posted: Wednesday Aug 21st, 2013 at 7:51 am #56341

Thanks so much for your response.

Unfortunately, the donate button isn’t what the client is looking for. They really want an integrated solution. The pro form that came packaged with the plug-in would have been ideal if a custom amount was possible. I’ll have to look for a different solution.

Posted: Wednesday Aug 21st, 2013 at 8:07 am #56347

~ AUTO-GENERATED NOTICE

Action taken: I posted a private contact form and referenced this Topic.

Posted: Wednesday Aug 21st, 2013 at 8:15 am #56348
Bruce
Username: Bruce
Staff Member
@andreainblue

They really want an integrated solution. The pro form that came packaged with the plug-in would have been ideal if a custom amount was possible.

The Pro Forms are not (by default) capable of doing this, but you might be able to accomplish this with a little custom code if you absolutely need to. s2Member encrypts all of the information with Pro Forms to keep it impossible for Users to change this price normally, but you can create a custom Pro Form template, and change the amount value based on an input field that you create in this template.

See: Pre Sale FAQs » Is it possible to modify s2Member® Pro Form templates?

If you create a field in this Pro Form template, you can get the value that Users pass into this field, and use it to change the amount that you charge a User (either recurring or non-recurring) using the information here:

Knowledge Base » Using Variables In A Shortcode

You would want to use the second example in this article:

<?php
add_filter ("ws_plugin__s2member_pro_paypal_checkout_post_attr", "my_paypal_pro_checkout_form_attr");
function my_paypal_pro_checkout_form_attr($attr = array()) {
if($_POST["something-custom"] === "some custom value") {
	$attr["ra"] = "10.00"; // Adjust price dynamically
	// And/or, you could adjust other attributes too
	// $attr["rp"], $attr["rt"], etc.
}
return (array) $attr;
}

Past that, sorry. I can’t really say how this could be possible. I’ve never had anyone ask for this capability with Pro Forms before.

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.