01 Jan 2009 - Treasury Guide

Treasury Module Setup
  1. Since you are here, I presume you have installed successfully, and followed the instructions provided in the package notes.

  2. There are help tips for admin options that describe their use.
    Just click the Help icon for a pop-up to see the descriptions.

  3. In the PayPal Config tab, ensure you enter your own PayPal email ID (and your PayPal primary currency) - it simply will not work with the default email ID from install.

  4. If you know how to use the PayPal "sandbox", you can test all you like after setting up a (free) developer account with PayPal. The sandbox was used to debug this module.
    If not, get a friend to make some test donations, unless you have a second PayPal account to use. You can refund these through your PayPal account, without any fees or penalties.

  5. Check the admin options for setting up the Module appearance (and Block for TP users).

  6. You must setup your viewing and admin permissions for each Membergroup.

  7. Should you wish to change the name that appears in your menu bar from "Donations", you can edit the value for $txt['treasury_menu'] in,
    Note: you will need to reverse that change before un-install, or you will encounter an error.

  8. Other Treasury language defines can be found in,
    You don't need to reverse these changes before un-install as the whole file is removed.

  9. TinyPortal users with SMF 1.1.x can setup the Donations Block by following these instructions.

PayPal Account Setup

If you choose to ignore this advice, ask PayPal - they get paid to answer your questions.
I don't mean to be rude, but the info is provided for a good reason - so you can help yourself.

If you have problems and do not have full access to the PayPal account profile, do not contact us.
It is impossible to problem solve when you cannot directly verify account settings or changes.

I leave your selection of a PayPal account entirely up to you - I will not provide advice on this issue.
After a previous unpleasant experience, I will not leave myself open to absurd threats of legal action.
  1. Treasury requires IPN settings in your PayPal account "Profile":
    • Set 'IPN' to 'On' in "Instant Payment Notification Preferences".
    • This will also require a URL to be entered - anything will do, but not blank.

    The URL you set here is NOT important as Treasury operates from its own Notify and Return URLs which ignore, and are independent of, your PayPal settings.
    Why? If you already have an IPN setting activated for some other program, it will continue to function for that program.
    Example? If you have already set your IPN URL so that you can use, say, Paid Subscriptions, then you can leave the URL on PayPal as it is, and still use Treasury.

  2. You should also modify "Payment Receiving Preferences" in your "Profile" area:
    • Check your option for "Block payments sent to me in a currency I do not hold:".
    • You should set this to the second option "No, accept them and convert them...".

    Failure to do this means you will have to manually confirm each payment within your PayPal account and the donation will NOT show on your site.

  3. Treasury settings in "Website Payment Preferences" - you need to set:
    • Set/Leave 'Auto Return' to 'On', repeat 'On' in "Website Payment Preferences".
    • Set/Leave 'Payment Data Transfer' to 'Off' in "Website Payment Preferences".
    If you need to have PDT 'On' for some other reason, you may have to manually add donation data.

  4. Settings in "Currency Balances" - these should not need changes:
    The PayPal default is fine - a primary currency which is Open and all other currencies Closed.
    If you do not have special reasons for operating with multiple open currencies, DO NOT fiddle!
    If you do have special reasons, you will not receive exchange rate and settle amounts from PayPal for non-primary currencies which you have Open.
    You WILL have to manually edit all Treasury transactions for currencies you receive that are not your Primary Currency!

Operational Notes
  1. The Registry tab allows you to manage your site's receipts & expenses with basic entries to record them. You can also total your most recent user contributions as a single entry in the register by Reconciling your paypal receipts. Should you wish to provide full disclosure to your donors, you can elect to display a summary of your Income & Expenses to them.

  2. The Block is provided as an SSI function for TinyPortal installations where you can have a side-block or for SMF users who wish to locate the block elsewhere within their site. It allows you to display your current donation goal and what funds have been received towards that goal. Display of Goals and/or Donormeter is selectable. It also lists the users who have contributed in the current period or event.
    The Treasury main page already provides all of this information.

  3. Your monthly goals are displayed on the Treasury page.

  4. The bar below the goal summary (near the bottom of the block for SSI users) is the percent achievement of your monthly goal, and will change color with status.

  5. Users can view their personal donation summary through their Profile.
    (viewable only by the user or admin)

  6. Treasury accepts pending payments, like eCheck, and stores the info in the database, with status of 'Pending'. When the eCheck clears, it should now receive the PayPal IPN info and automatically update your database - otherwise, you can change status to 'Completed' in Donations and the donation will appear in your goals and donor list - you will need to add data for the fee, settle amount and exchange rate.

  7. Treasury will also account for any refunds that you process - they will automatically cancel out the original donation and a record will be saved in the Transaction Log. The donor's profile will show the original donation as well as the refund.

  8. You can verify that your site will respond to PayPal by clicking the ipntest link.
    • This will also place an entry in your transaction log.

  9. Got an Internal Server Error 500 when PayPal returns to your site?
    Check file permissions for http://$boardurl/ipntreas.php are 644 or 755 (CHMOD to 644 if they are 777 or 666).

  10. If you are having problems with transactions not appearing, check the Transaction Log for any clues to problems.
    • if they pay by echeck (3 days to clear) the log will contain "pending_reason => echeck".

  11. Whenever IPN data is not stored in your database, you will have to manually enter the data from your PayPal Email in the bottom row of the Donations tab.

  12. Treasury collates information on the basis of paypal transactions for your email address.
    • this means that the "business" field for a transaction is expected to match the "receiver email" address you specified in your PayPal Config tab.
    • if the two don't match up, the donation will be ignored in summaries, so you need to edit the "business" field in your database 'treas_donations' table.

  13. Time based donations - Treasury will collate donations for varying time periods, depending on the option you choose - monthly, quarterly, half yearly and yearly. At the end of whichever period you choose, it will automatically move onto the next period.

  14. Event based donations - this is an alternative to the existing time-based donation system.
    Choosing an event overrides time-based - it does not support both simultaneously.
    It will only operate for one event Campaign at a time, and you must decide when to end any given campaign.

  15. Supporters group - donors can be automatically assigned to a special group of your choice - if donors are not already a member of a "Primary" group, then that is where it will be assigned, resulting in the appropriate rank/badge/stars being displayed in forum posts.
    Otherwise they will be assigned to an "Additional" group.

  16. Membergroup subscriptions - not to be confused with PayPal subscriptions. You can choose to allow that Supporters group membership only for your donation duration i.e. monthly, quarterly, etc. after which their group membership will automatically expire and they will be removed from the group.

    Each subsequent donation by a given donor will simply extend the expiry date by the duration for which the donation was made.
    e.g. your duration is Monthly, a donation on 15th Feb will expire on 15th March.
    Same donor contributes again on 27th Feb, so the expiry is extended to 27th March.

Un-Install Notes
  1. Points 3, 4 & 5 apply to most mods, not just Treasury.

  2. You must first reverse any manual changes you made to Modifications.english.php.

  3. You must run Uninstall before upgrading so that all existing Treasury changes and files can be removed.
    Note: for theme changes, Uninstall will only modify the default theme.
    Any manual changes you made to other themes you must manually reverse yourself.

  4. To avoid any warnings below, it is recommended that you first uninstall mods added after Treasury, and uninstall them in the REVERSE ORDER that you installed them.
    index.php?action=packages;sa=installed shows the order in which you installed.

  5. If you do have warnings below, continuing the uninstall process WILL create issues with your site. Use the Package Parser and check the Uninstall option to provide guidelines to manual removal of Treasury.
    Then determine what caused this issue and fix that.

  6. NOTE: Uninstall will deliberately NOT remove the Treasury database tables.
    For permanent Uninstall you will need to manually drop these tables from the database:
    - smf_log_treasurey
    - smf_treas_config
    - smf_treas_donations
    - smf_treas_events
    - smf_treas_registry
    - smf_treas_subscribers
    - smf_treas_targets
    (assumes you used smf_ for your prefix)

To Do
  1. Optimize database queries.
  2. Free prize plug-in to reward donors.
  3. Recurring donations.
  4. SSI function provided to locate block info on SMF sites.
  5. Add menu buttons for extra themes - see Treasury FAQ.
  6. Donors can select their initial PayPal screen language.
  7. Donors assigned to primary group first, then additional group.
  8. Add version update info.
  9. Event based donations.
  10. Link to allow full transparency of site income/expenses.
  11. Member group based "subscriptions".
  12. Donation periods set for calendar month, quarter, half-year or year.
  13. Some extra language defines for multi-lingual compatibility.
  14. Fix or eliminate the javascript field checks.
  15. Ability to view donation totals on a monthly/annual basis, or select a time period

  1. Bugs and requests must be reported through the Bugger system.

  2. Any other support is Available Here, provided you provide a website link, have full access to your PayPal account, and are prepared to provide screenshots if and when requested - we cannot work in a vacuum.

  3. PayPal support is from the PayPal site - there are some things you simply must do for yourself.

AFAIK, all SMF security requirements are met, and all bugs resolved, so please enjoy!

Comments *

Commenting option has been turned off for this article.