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.

Donation Button Advice Needed Please

Home Forums Community Forum Unofficial Extensions/Hacks Donation Button Advice Needed Please

This topic contains 7 replies, has 2 voices. Last updated by  Eduan 4 years, 2 months ago.

Topic Author Topic
Posted: Thursday Nov 1st, 2012 at 12:36 pm #30327

Greetings from Texas!

First let me start by saying I have basically read about my question for two days, lol. So not just throwing question out here without hours of studying:)

I have found two methods for creating donation (pay what you want) Paypal buttons that seem to fit my needs.

The first seems a little outdated and is the first one I found yesterday:

1) http://www.primothemes.com/forums/viewtopic.php?f=4&t=16566&p=59040#p59040

But when going to install PHP plugin, there is a caution about that the plugin has not been updated in 2 years.

The second I found this morning:

2) http://www.s2member.com/forums/topic/custom-donate-amount/ which shows example at:
http://eduantech.com/code-snippets/donation-button-that-gives-access

I am not sure it matters to me if user needs to be registered first or not. Was thinking of placing a free signup link using Buddypress and donation button on same page and allow user to decide.

So, looking for input from others.

>Which two of the above seems best?

>Is it better to have user register first, then offer them the donation (pay what you what actually) button?

Thank you so much,

Terry

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Thursday Nov 1st, 2012 at 1:46 pm #30342
Eduan
Username: Eduan
Moderator

Hello Terry,

>Which two of the above seems best?

For this, I suggest you my version, it is more secure in terms of privacy and piracy (although doesn’t really matter for piracy in a donation button. ;) )

It would also require the PHP Execution plugin BTW, you don’t really have to worry about it, it would still work anyway because of the way PHP and the plugin are made. :)

>Is it better to have user register first, then offer them the donation (pay what you what actually) button?

I would suggest you don’t require them to register first, as this donation button would give them access as well, once the payment works.

For the record, my hack allows you to use the following shortcode in order to output the donation button:
[donation-button]

Hope this helps. :)

Posted: Thursday Nov 1st, 2012 at 2:03 pm #30348

Thank you Eduan!

I was leaning towards yours, but little confused and this stems from my just learning S2 and not advance WP user I am sure.

My confusion is the following taken from your excellent tutorial:

Now, it is very important you do the following, you must replace the shortcode inside do_shortcode with an actual shortcode that you generated in your website, this shortcode must be modified in a couple of ways, first, in the ra attribute, put the following:
‘ . $option . ‘
This is important, for if you don’t, the shortcode won’t actually respond to the amount of dollars the user wishes to pay.

Could you push me along and explain for an old hard headed person:)

Not sure I understand “do_shortcode” and the “ra attribute” part. Is an example of these two steps possible here (or on your personal site)?

Sure once I see extended example going to feel silly…

Appreciate your help,

Terry

Posted: Thursday Nov 1st, 2012 at 2:25 pm #30352
Eduan
Username: Eduan
Moderator

Well, the do_shortcode part is what evaluates every shortcode that you use in WordPress. Here I am using it in order to be able to get a button from that shortcode, and you change the output attribute in order for it to give you an URL, and let the hack redirect the user to the correct PayPal URL.

Regarding the ra attribute, to put it simply, adding that to the ra attribute is what allows this button to know how much the user wants to pay. It’s what says how much the user will pay from his PayPal account, and so I made it change depending on what the user chooses to pay.

Does this make it a little bit clearer?
– Eduan

Posted: Thursday Nov 1st, 2012 at 4:03 pm #30358

Yes Eduan, that does make it little clearer but I must do some reading to understand the do_shortcode. Not sure where it is.

I think the ra attribute is part of S2.

Just got to do some studying it appears so I can make this work.

Was hoping for little more in-depth example but understand one must learn and not count on others to hold their hand, lol.

Terry

Posted: Thursday Nov 1st, 2012 at 4:12 pm #30359
Eduan
Username: Eduan
Moderator

Well you can find an explanation of do_shortcode in the WordPress codex:
http://codex.wordpress.org/Function_Reference/do_shortcode

And you can find an explanation of the ra attribute under s2Member’s documentation, which you can find here:
Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes (Explained) -› ra

Hope this helps. :)

Posted: Thursday Nov 1st, 2012 at 4:36 pm #30361

Thanks Eduan! That will give me some study time.

For time being going to use the other method so I can get this part completed and move on. Will come back to your method when I have some down time.

Appreciate you help much,

Terry

Posted: Thursday Nov 1st, 2012 at 4:57 pm #30362
Eduan
Username: Eduan
Moderator

No problem Terry. :)

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