Resource icon

[Aayush] PayPal Donate 1.04

No permission to download

Aayush Agrawal

Well-known member
Aayush Agrawal submitted a new resource:

[Aayush] PayPal Donate - Advanced PayPal Donate system for XenForo.

Description:
Advanced PayPal Donate system for XenForo.

Features:
  • Allow users to donate suggested or custom amounts, or both
  • Ability to set a goal with title and description
  • Ability to set a minumum donation amount
  • Option to set permissions for donating and viewing
  • Donation listing
  • Donation Bar
  • Donation Goal Sidebar
  • Confirmed/Unconfirm/Delete donations
  • PayPal IPN Support.
  • Move or add confirmed donors to your VIP/Donor usergroup...

Read more about this resource...
 
Will be installing this later tonight when I get home. Been looking for an auto donation type of mod since that other one has turned into abandon ware.
 
Is it possible to display it in the sidebar without listing a goal?

Do you support a PayPal option for recurring payments for donations?
 
Is it possible to display it in the sidebar without listing a goal?

Do you support a PayPal option for recurring payments for donations?

Modify Aayush_PD_donation_goal_sidebar template and remove goal, progress bar. So yeah its possible.

Recurring donation: No. Need some minor modifications.
 
So if the sidebar is modified, does it include a description for the donation?

I'm currently using another donation sidebar add-on for my forums (see below). Just wondering if you would be offering more features. Let me know if you can consider the sidebar question support for a recurring payment option in addition to a single payment.
 
Donating to a forum does not have a clear path back.. Instead it asks you if you would like to return to the email address the donation was submitted to opposed to the website the donation module is installed on.. Other then that my donation went through without a hitch and even got the confirmation alert within seconds.. (Good Stuff as best i can tell)
 
Last edited:
Donating to a forum does not have a clear path back.. Instead it asks you if you would like to return to the email address the donation was submitted to opposed to the website the donation module is installed on.. Other then that my donation went through without a hitch and even got the confirmation alert within seconds.. (Good Stuff as best i can tell)

You should be redirected to this page after payment is completed. (donations/complete)
Thank you for your donation   XenForo.webp

You have to enable auto return in your PayPal account, otherwise it will ignore the return field.

From the PayPal documentation

Auto Return is turned off by default. To turn on Auto Return:

  1. Log in to your PayPal account at https://www.paypal.com. The My Account Overview page appears.
  2. Click the Profile subtab. The Profile Summary page appears.
  3. Click the My Selling Tools link in the left column.
  4. Under the Selling Online section, click the Update link in the row for Website Preferences. The Website Payment Preferences page appears
  5. Under Auto Return for Website Payments, click the On radio button to enable Auto Return.
  6. In the Return URL field, enter the URL (http://yourforum.com/index.php?donations/complete) to which you want your payers redirected after they complete their payments. NOTE: PayPal checks the Return URL that you enter. If the URL is not properly formatted or cannot be validated, PayPal will not activate Auto Return.
  7. Scroll to the bottom of the page, and click the Save button.
 
Last edited:
@Aayush Agrawal, is it possible to acknowledge those that have donated prior to installing this addon? If so, how? Thanks -

You can add manual donations through "admin.php?donations/add" OR run sql query to transfer (donor userid, donate amount, date) from existing donation table to aayush_ppdonate table
 
Last edited:
So if the sidebar is modified, does it include a description for the donation?

I'm currently using another donation sidebar add-on for my forums (see below). Just wondering if you would be offering more features. Let me know if you can consider the sidebar question support for a recurring payment option in addition to a single payment.

You will have to add description.

Edit "Aayush_PD_donation_goal_sidebar" template.

Replace With:
Code:
<xen:if is="{$visitor.canDonate} && !{$xenOptions.PD_DisableDonations}">
    <xen:require css="Aayush_PD.css" />
 
    <div class="DonationGoal section">
        <div class="secondaryContent">
            <h3><a href="{xen:link donate}">{xen:phrase donate}</a></h3>
            <div class="minorHeading donationNote">
                 description goes here...
            </div>

            <a href="{xen:link donate}#donateForm" class="donateButton"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="{xen:phrase donate}" /></a>
        </div>
    </div>
</xen:if>

Edit "Aayush_PD_donation_goal" template

Replace With:
Code:
<xen:require css="Aayush_PD.css" />

<script type="text/javascript">
$(function()
{
    $('.donateButton img').click(function(e)
    {
        var $ctrl = $(this),
        $form = $ctrl.closest('form');
           
        $form.submit();
    });
   
    <xen:if is="{$xenOptions.PD_AllowCustomAmount}">
    $('#ctrl_amount').change(function() 
    {
        if ($(this).val() == 'custom')
        {
            $('#custom_amount').css('display', 'inline-block');
        }
        else
        {
            $('#custom_amount').css('display', 'none');
        }
    });
    </xen:if>
});
</script>

   
<div class="DonationGoal section">   
    <h2 class="heading">{xen:phrase donate}</h2>
    <div class="section">
        <blockquote class="baseHtml donationNote">Description goes here...</blockquote>
       
        <h2 class="textHeading">{xen:phrase please_choose_from_the_options_below}</h2>
       
        <form id="donateForm" action="{xen:link 'donations/donate'}" method="post" class="xenForm AutoValidator" data-redirect="on">
            <dl class="ctrlUnit">
                <dt><label for="ctrl_amount">{xen:phrase amount}:</label></dt>
                <dd>
                    <select name="amount" class="textCtrl autoSize" id="ctrl_amount" >
                    <xen:foreach loop="$amounts" value="$amount">
                        <option value="{$amount}">{$amount} {$xenOptions.PD_Currency}</option>
                    </xen:foreach>   
                    <xen:if is="{$xenOptions.PD_AllowCustomAmount}">
                        <option value="custom">{xen:phrase custom}</option>
                    </xen:if>               
                    </select>
                   
                    <xen:if is="{$xenOptions.PD_AllowCustomAmount}">
                        <span id="custom_amount">
                            <input type="text" class="textCtrl" size="5" name="custom_amount" /> <span class="textCtrl">{$xenOptions.PD_Currency}</span>
                        </span>
                    </xen:if>
                </dd>
            </dl>
           
            <dl class="ctrlUnit">
                <dt><label for="ctrl_note">{xen:phrase note}:</label><dfn>{xen:phrase optional}</dfn></dt>
                <dd><textarea rows="2" name="note" id="ctrl_note" class="textCtrl"></textarea></dd>
            </dl>
           
            <dl class="ctrlUnit">
                <dt><label for="ctrl_anonymous">{xen:phrase anonymous}:</label></dt>
                <dd><input type="checkbox" name="anonymous" value="1" id="ctrl_anonymous" /> </dd>
            </dl>
           
            <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
           
            <dl class="ctrlUnit">
                <dt></dt>
                <dd><a class="donateButton"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="{xen:phrase donate}" /></a></dd>
            </dl>
        </form>
    </div>
</div>
 
Also can you format the numbers? Currently it reads like this: Goal amount for this month: 10000000 USD, Received: 0 USD (0%)
 
Top Bottom