1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Aayush] PayPal Donate 1.04

Advanced PayPal Donate system for XenForo.

  1. Aayush Agrawal

    Aayush Agrawal Well-Known Member

    Aayush Agrawal submitted a new resource:

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

    Read more about this resource...
     
    51463 and Collapsible Myth like this.
  2. Aayush Agrawal

    Aayush Agrawal Well-Known Member

    Reserved....
     
  3. Collapsible Myth

    Collapsible Myth Active Member

    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.
     
  4. Gene Steinberg

    Gene Steinberg Well-Known Member

    Is it possible to display it in the sidebar without listing a goal?

    Do you support a PayPal option for recurring payments for donations?
     
  5. Aayush Agrawal

    Aayush Agrawal Well-Known Member

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

    Recurring donation: No. Need some minor modifications.
     
  6. Gene Steinberg

    Gene Steinberg Well-Known Member

    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.
     
  7. FredC

    FredC Well-Known Member

    Bummer. :(
     
  8. FredC

    FredC Well-Known Member

    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: Aug 12, 2015
  9. m3commish

    m3commish Active Member

    @Aayush Agrawal, is it possible to acknowledge those that have donated prior to installing this addon? If so, how? Thanks -
     
  10. MirandaSings

    MirandaSings Active Member

    Sorry @Aayush Agrawal but I'm confused on how to use this, how do I set a goal and set it to my paypal email?
     
    Last edited: Aug 13, 2015
  11. Aayush Agrawal

    Aayush Agrawal Well-Known Member

    After Installing the addon, open http://yourforum.com/admin.php?options/list/paypalDonate
    Enter your paypal account email address and click on save changes button. Default goal amount is 100 USD or 100 EUR. If you wish to change that, just edit Goal Amount option.
     
  12. MirandaSings

    MirandaSings Active Member

    Thanks!!
     
  13. Aayush Agrawal

    Aayush Agrawal Well-Known Member

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

    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: Aug 13, 2015
  14. Aayush Agrawal

    Aayush Agrawal Well-Known Member

    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: Aug 13, 2015
  15. Aayush Agrawal

    Aayush Agrawal Well-Known Member

    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>
    
     
    hellreturn and BamaStangGuy like this.
  16. BamaStangGuy

    BamaStangGuy Well-Known Member

    What about those of us who use widgetframework?
     
  17. Aayush Agrawal

    Aayush Agrawal Well-Known Member

    1. Create a new widget with type as "Advanced Template Without Wrapper"
    2. Template name: aayush_PD_donation_goal_sidebar
    3. Hook: forum_view or forum_list
    4. Save
     
    Cyb3r, electrogypsy, hacmieu and 3 others like this.
  18. BamaStangGuy

    BamaStangGuy Well-Known Member

    Also can you format the numbers? Currently it reads like this: Goal amount for this month: 10000000 USD, Received: 0 USD (0%)
     
  19. Aayush Agrawal

    Aayush Agrawal Well-Known Member

    Enter integer value as goal amount. Ex 250
     
  20. BamaStangGuy

    BamaStangGuy Well-Known Member

    1000 should be $1,000 etc etc.
     

Share This Page