PayPal Money Module

After Adam Frisby did announce his DTL PayPal Money Module for OpenSim about a month ago, which got much positive feedback, I did test it intensively and I did extend it’s functionality. Last week Adam and I did decide, that it is the best if I continue to work on it using a fork of his GIT repository.

You can find that GIT repository with the latest version of the PayPal money module for OpenSim here: This fork has been renamed from DTL-PayPal to Mod-PayPal to avoid confusion.

Functional Extensions and Bug Fixes

  • User2User pay, User2Object pay, User2Object purchases and User2Land purchases work properly, now
  • User2User payments are confirmed with instant messages to senders and receivers
  • Support for group owned objects and land can be enabled (default: off); requirement: PayPal email accounts have to be defined per group
  • Underscores in email addresses do not cause error messages during OpenSim startup anymore
  • Object and land purchases for US$ 0 do not initiate a PayPal transaction anymore
  • Object purchases properly transfer the purchased contents to the buyer, now
  • User email addresses are loaded from the local OpenSim.ini file; invalid email adresses are ignored, but loading is not aborted anymore
  • User email addresses can also be fetched from the Users grid service, if that feature is enabled (default: off); fetched email addresses are cached by the region server until region restart; local email addresses always take precedence, to ensure an acceptable level of security
  • Locally defined user email addresses should be used for all users that receive bigger amounts of money within a region (i.e. shop owners); the reason is the much higher security, if these email addresses are not fetched from the Users grid service; beside that it is possible to locally use a special PalPal micropayment account for all shop transactions to save fees, instead of a standard PayPal account used elsewhere
  • Group email addresses can be defined per group UUID in the local ini file to support group owned objects and land as mentioned before
  • Non existent user or group email addresses are handled by showing warning messages, instead of error messages for crashed code
  • Added start and success log messages for all kinds of PayPal transactions
  • Rounding problems made it impossible to pay certain amounts (like US$ 1.23); now all amounts work and are displayed nicely

Interesting findings

  • PayPal can send money to all email accounts, even to email accounts not registered at PayPal yet; thus it is not necessary to handle that case
  • PayPal micropayment accounts are not available in all countries worldwide

To Do List

  • Web pages that are shown after successful or cancelled PayPal transactions
  • Locking for PayPal transactions while buying land or original objects
  • Events or functions that allow to lock vendors while a PayPal transaction is in progress
  • Too small amounts that do not cover the PayPal transaction fees produce a misleading error message on the PayPal web page; maybe it would be good to be able to define a minimum amount globally and/or per email address to avoid that
  • It would be good if a scripter using llGiveMoney gets a warning message, that this function is not supported by the PayPal money module
  • User2User payments are confirmed with instant messages to the sender and receiver of money, but only if these users are online at that time; maybe it is possible to improve that, so that even users offline get such confirmation messages as stored offline messages

Installation of the PayPal Money Module

  • Install the addon-modules/mod-paypal under OpenSim/Region/OptionalModules/
  • Install the files-for-bin-dir in the OpenSim bin folder
  • Add the additional config settings in the config-include subfolder or in the OpenSim.ini file in your bin folder
  • After that compile OpenSim

If you find bugs or if you have ideas for the future development of this module, please send me an email ( Thank!


21 Responses to “PayPal Money Module”

  1. 3 annakarlafti June 6, 2011 at 6:10 pm

    As much as I loved it!!! I’ve tried to get it to work on a Diva Distro installation..but no luck.. any suggestions??

  2. 4 Snoopy Pfeffer June 6, 2011 at 6:25 pm

    Currently it is necessary to compile the PayPal money module yourself, together with OpenSim. You do this by putting the source code of the PayPal money module in the addon-modules OpenSim subfolder before compiling.

    There is no precompiled version yet, because this would very much depend on the OpenSim version you use. In general the precompiled Diva Distribution could add the compiled version of the PayPal money module to it’s distribution.

  3. 5 fabiobasile October 15, 2011 at 7:54 pm

    Hi, i have recently started my own grid and I’m exploring the possibility on an in-world currency.

    Having downloaded and installed the PayPal module as per instructions and added the extra lines to my opensim.ini, i started the grid, but i have not seen any mention of the [PayPal] module lines in the output stream (was i supposed to?), and while being logged in with my Banker Avatar, i tried to purchase currency, but it complained that my grid’s server could not be reached.

    I’m currently running the latest Diva distro with profiles and groups enabled, no errors thrown, and using a hosted SQL.

    In hindsight, I did figure there was no trace of a line in opensim.ini or anywhere else where to specify the address of my PayPal IPN, or perhaps a web interface… so i feel I’m missing a couple of pieces to my puzzle here… any help is appreciated! 🙂

  4. 6 Snoopy Pfeffer October 16, 2011 at 4:24 am

    On the OpenSim console or in the log file you should see lines that say that PayPal got enabled. If that is not true, there is no PayPal dynamic library in the bin folder or the corresponding section in the OpenSim.ini config file is missing. Best check that both is there.

    To be able to use PayPal, all users receiving money have to have email addresses specified as part of their OpenSim user profiles. For that simply enter the email addresses when new users are created.

    The PayPal section in OpenSim.ini does not contain any PayPal account specific information. Such information is entered by the user on a secure web page that is opened to perform money transactions.

    • 7 Fabio Basile October 16, 2011 at 4:55 am

      Thanks for the prompt reply, I will have to check the log again, but I don’t have any dll’s under /bin. I have spent a bit of time searching for modules but all I have been stumbling upon is not compiled and I’m not sure how to go about that.

  5. 8 Snoopy Pfeffer October 16, 2011 at 6:18 am

    You have to compile OpenSim yourself with the source code of the PayPal money module in the addon-modules subfolder. Then it creates the missing dynamic link library.

    • 9 Fabio Basile October 16, 2011 at 7:18 pm

      Sadly I’m not familiar at all with how to go about correctly compiling OpenSim, so i might need some steps… 🙂

      I can’t help thinking that since there hasn’t been that many versions after 7.2, there should be at least some fully compiled releases of the money module with Opensim.32bitlaunch.exe patches somewhere on the web…

      I do understand some of the ideological reasons behind the choice of excluding the money module from official releases, i just don’t get why there is no trace of anything fully developed since 2009 available to new grid admins… that i am aware of anyway… 🙂

  6. 10 Snoopy Pfeffer October 16, 2011 at 10:01 pm

    You can find information how to compile OpenSim yourself on It is not as difficult as it may sound.

    One of the reasons that I publish this module just as source code is, that it’s functionality is quite security sensitive and I prefer that just people that can read the source code decide to use it.

    It is true that the OpenSim project in general has decided a long time ago to not include a “real” money module in the standard OpenSim package to avoid any potential legal issues.

  7. 11 Fabio Basile October 17, 2011 at 2:44 am

    I see your point, as much as I’m not a programmer per-se’, I’ll give it a try, I get the feeling you are right and it’s not as hard as I think it is…

  8. 12 Fabio Basile October 23, 2011 at 2:22 am

    Please disregard my previous comment, i eventually managed to compile the module with release 0.7.2 and set it up just the way it was ( i just copied over a few configuration files and my opensim.ini.

    Now I’m wondering if i’m facing a client problem. With the module installed, i don’t get anymore the DNS not found messages, yet whether i try to buy currency, or transfer it onto another user, the client crashes. If i dod that externally, meaning opening the PayPal sandbox window in Firefox/Chrome/etc… the transaction goes through, but not in world. I don’t see any change in balances or any message or indication of a successful transfer.

    I have noticed that upon activating the module, all users automatically display a balance of $O 100,000. I have tried to transfer some of that balance onto other users unsuccessfully. No messages or notifications whatsoever.

    Also the odd thing is that I’d figure with a positive balance i could just pretty much try and play with that without logging into PayPal, but even with a positive balance, the client (Imprudence) demands that i log into PayPal for a new transaction.

    At this point, i’m feeling like i’m either missing some config files, or php files, or even db tables maybe? Where are the balances recorded btw?

    One last thing: the Banker Avatar. How do i use it? I created it and set it in opensim.ini, and yet even with the default sample money module it just can’t seem to be able to “purchase” currency the way it is usually described.

    Sorry for the landslide of questions, but i’m feeling really close to solving this one! 🙂

  9. 13 Joseph Chrzempiec July 14, 2012 at 6:37 pm

    hello i have a question sinse im really new to opensim and payments and really not a programer my self. but the Question is how does this payment work? when someone clicks the payment button and pay say $10.00 usd money and they get say OS$1000 does the virtual money go to there account does it show in the viewer that this is what the user have and it updates and show the newer balence?

    • 14 Snoopy Pfeffer July 15, 2012 at 10:33 am

      Hello Joseph

      The payments work like in Second Life (pay user or object, buy object or land). The main difference is that US$ cents are used and that no virtual currency is needed. This is also the reason why the maximum amount that can be spent is shown as account balance. It is impossible to fetch the current PayPal balance and anyway more money can be spent via PayPal, if there is a valid credit card associated with the PayPal account.

      The main difference compared to Second Life is, that each payment has to be confirmed on the PayPal web site. Beside that the scripting function llGiveMoney is not supported, because it would require that the owner of that script confirms the payment more or less immediately, but that user even might not be online.

      The money is transferred to the PayPal account associated with the email address the user did use to register his/her account. The transaction history and current balance can only be looked at on the PayPal web site after logging in.


  10. 15 Joseph Chrzempiec January 3, 2013 at 12:54 am

    i know i’m new to this and all but in the info said need to compile it what to do you mean by that? sorry i’m new to it and learning to program?

  11. 16 Snoopy Pfeffer January 3, 2013 at 9:38 am

    Hello Joseph You can find a description how to compile OpenSim on the following web page:

  12. 17 maxoide August 14, 2014 at 9:08 pm

    Paypal Module does not work for the visitors from other grids, Paypal account balance is 0 (but in ini AllowGridEmails = true).
    It does not work after teleport to another region on my grid, paypal balance disappear.
    Any ideas?
    I have grid/HG configuration, last release under centos.

    • 18 Snoopy Pfeffer August 14, 2014 at 9:13 pm

      It is important that you use the following config setting in the [PayPal] section of your OpenSim.ini file, to ensure that the balance is sent each time an avatar enters the region. This way the problem you describe can be avoided.

      BalanceOnEntry = true

      • 19 maxoide August 15, 2014 at 12:19 pm


        My configuration is

        AllowGridEmails = true

        AllowGroups = true

        BalanceOnEntry = true

        However it does not work. I forgot to write that I use mono 3.2.3 under centos (your module was compiled with this version).

  13. 20 maxoide August 15, 2014 at 1:35 pm

    Ok, it is resolved by erasing some .dll on my simulator from other (optional) modules. Now it works nice.

  14. 21 Snoopy Pfeffer August 15, 2014 at 2:15 pm

    Great that you could get it working.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog Stats

  • 22,398 hits


November 2009
« Sep   Dec »

%d bloggers like this: