Give1Get2 Developer’s Guide English

Give 1 Get 2 – Give One Get Two / MOCHA – Moneybookers Exchange
(v. Beryl)

slide :

pdf :

The French version is the primary source for all translations.

Problems & Vision:

Creating a world without poverty to enable education, reducing disease and reducing mortality.

The paradigm shift

The existing paradigm solves some problems, so it was accepted in the past. However, at this moment, it does not meet the demand of everyone. So there was a challenge and a demand for change.

I studied the market for existing solutions. Not being satisfied (because if I was happy the issue was already resolved), so I decided to create this software. Because, in my opinion, we must phase out barriers to trade. (ref Treaty establishing the European Community, 1957)

The software « Give1Get2 » is designed to build an alternative trading market to existing financial markets. The software specialised in online fund raising. It facilitates free trade in the international economy. This software was created to meet the financing needs of economic agents in Europe and globally in order to finance, among other things, research, education and innovation.

Principles & Qualities:

– Freedom, Citizenship, Responsibility, Equality, Solidarity,
– Open, rule based, predictable, nondiscriminatory


Make a pilot project (functional, no set-up fees, free to use, legal, available (7/7j, 24/24h) and based on a win-win strategy) for an international trading platform from a PSP payment API (Moneybookers) and the FreePay Trading System (FTS) to help raise account balance of participants. (+1 Euro each time)

Directed: The main objective has been achieved.

The software has been tested in real conditions with personal accounts for the 3 possible cases of purchase (less, equal and higher) and in each case, it worked perfectly.

Simple example: when 1 Euro was sent, are received 2 Euros (factor 2: 1 * 2 = 2). The motto « Give 1. Get 2. » was chosen in this way. The starting amount is chosen by the user and may use the system as often as he wants. Example: 1234 Euros sent -> 2468 Euros received.


Target User: This software is being implemented, primarily targeting users of the PSP used speaking French or English and have minimal skills in finance (Moneybookers saves 9 million customers, according to Moneybookers). The goal is not to limit it to this category but can reach the largest number of users.

Target Developer: Those targeted for downloading and installing the software are programmers (preferably web developer) and / or companies wishing to establish a trading platform.

The platform does not take a percentage of the funds it raises. In this sense, an organization that would use it could be a non-profitable organization.

The strategy for doing business

There are 3 possible strategies for 2 people: lose, no deal or win. (representing 9 combinations in total)

Case study: I do not want to lose money (destruction of money) I do not want to lose money for someone wins. (theft of money) I want to change. I do not make money for someone to lose. (theft of money) I do not want to make money alone. (counterfeit) I want to make money and someone else wins, too.

The only solution that seems feasible is: the win-win strategy.

Business Model of an online trading platform with a Win-Win Strategy:

5 parts: Provider, Consumer, Competitor, Partner and Self.

– Payment Services Providers (PSP) have a business model that works by commissions (fixed and variable) on the transactions of their customers (about 2%). To increase their profits, they want to increase their volume of transactions and that customers send the most money.
– Their main partners are the merchants and trading platform that allows them to increase their volume of transactions and amounts over the users who use them. This is done by increasing the number of customers that is proportional to the access of their information systems: the API (Application Programming Interface) that allows anyone to automate payments.
– Their suppliers are one or more banks. The financial messages are handled electronically by the bank. The PSP received confirmation via an API.

– The internet users want to meet their needs. The needs of humanity are recurrent (must be met every day). This need is either a product or service, or money. The products are among the online marketplaces (e-commerce). The easy money is on the trading platform.
– To send money, the user needs a PSP. PSP and asked to have a bank account to fulfill its electronic wallet. Compared to the PSP, the user earns more per transaction if the gain is at its default value (maximum).

Competitor, Partner and Self:
– The business model of the trading platform is either the same as the PSP (for transactions), or an entrance fee or monthly fee or premium sponsorships (link id) or is free. (The money is earned in the same way as users.)
– Providers of trading platforms are the PSP with their API. (the logo is highlighted)
– The users use a service that allows them to move money. The strategy of moving money is defined either by the trading platform or by users themselves. (depends on the internal politics of the trading platform)
– The trading platform is a software layer above the PSP. The design and evolution of the computer product can be partially outsourced to one or more persons caring for an open source trading platform that would reduce costs and development time.


The link to the sponsorship program is here:

There are over 9 million customers who use Moneybookers (Moneybookers depending). The target population is mainly covered that already included. The affiliate can not take commissions on those already listed. (he did not himself sponsored, implied)

For people who are not registered yet, they can apply directly to the url in this case, the partner does not take commission.

Either option, register with the affiliate link (the URL provided in a footnote on the script) in this case, the affiliate will receive commissions on what wins the PSP (up to 30 % and limited to 100 Euros maximum) This is not an additional cost (30-70 division). It is therefore completely transparent to the user.

This incentive, I have put in place to increase the number of my partners on this project. I thought it was legitimate in order to pay the fixed costs (domain name) and variable operating costs (bandwidth, database) of each partner sites.

In addition, each user also has the ability to sponsor others in making requests for payments. I think it’s a fairness.

Interoperability: How do I know if the API electronic purse of a financial institution is compatible with FSX to FreePay?

Financial Institution:

1. It must be able to create an account.

2. Supply: The user can supply his account with different means of payment (check, credit card, bank transfer etc.) and remove.

3. It must have a minimum of funds in its account (balance at least 1 euro). (must also take into account the costs of financial institution)

Optional (but strongly recommended): Approval Financial: The financial institution must be approved by at least one regulator.

Separation of tests and the real: The customer transfers between normal and test client are prohibited.

On the FSX:

1. It must be able to pass an order on the FSX and get on the payment platform. (POST or GET)

2. B2B, B2C, C2B & C2C: Let the payment works in 2 directions (merchant-seller while being accessible client-customer, merchant-customer and customer-merchant), briefly allow P2P. The right of withdrawal depends on the status of persons making the transactions and all, it is defined on the site of PSP.

2a. (optional: but it’s better to do) should be able to enable process automation. (XML)

3. XML: It is necessary that the source site (merchant / FSX) to obtain a trace of the transaction from the payment platform. (xml sent and saved in the database tables in sql)

Existing: What is Moneybookers?

– Moneybookers is a payment service secure online that lets you send and receive money instantly from an e-mail. Opening an account is free, and loading and withdrawal of money is through a credit card (Visa, Mastercard, Diners, American Express, JCB, Delta / Visa Debit and Visa Electron) or by bank transfer.

– Moneybookers is translated into 12 different languages. (English, German, French, Spanish, Italian, Polish, Modern Greek, Romanian, Russian, Turkish, Chinese, Czech)

– Transaction costs are low and the deals can be found in the account history at any time.

– Moneybookers is an issuer of electronic money that allows the merchant (or merchant company) to accept online payments from customers worldwide with no installation fees or monthly fees. (in English: Payment Service Provider)

– Moneybookers Ltd. is a company registered in the Trade Registry of England and Wales under No. 4260907. Headquarters: Welken House, 10-11 Charterhouse Square, London, EC1M 6EH. It is licensed under the laws of the United Kingdom and the European Union and regulated by the Financial Services Authority (FSA), the Financial Services Authority in the United Kingdom.

Why a relationship with a PSP:

The division of roles: The software can be seen as a plugin that interacts with the main software (financial institution) to bring him a new feature. The software is an open system that sends information to the internal (history) and outside (order).
– The financial institution converts capital into e-money, make payments and make the conversion of checks.
– The software can place orders for payment, exchanging payment orders and can make claims.

Dependence: The software is towards simplicity as compared to the previous version (FreePay), he subtracted the processes needed to manage money. This software saves the cost of initial capital (1 million Euros) for the creation of a financial institution issuing electronic money (in: e-money issuer) within the European Union. (ref: Article 4 paragraph 1 of Directive 2000 46 EC).

Independence: Each organization that sets up the software Give1Get2 is autonomous from other organizations. It is dependent only financial institution which helps to make payments (1 to many relationship).

What is « Give1Get2?

The trading system is based on a win-win. The trading platform is a place of confrontation in the supply of financial securities and the demand for money under the idea of laissez-faire economics. There are no goods exchanged on the system. It is a zero sum game in terms of the payment platform but not the trading system (1 euro securitized token issued for the initiation, exchange +1 +1 for each party to each transaction). It’s a virtuous circle. There is no entrance fee. It is a system of person to person (P2P) which further allows users to place trades on a payment platform. This was designed so that there is no risk of inverse proportionality. Since there is no order of sale, it may not be a stock market crash. All system users can get rich, but not at the same time. The user can then become, as it makes a trader. (en: Market Operator)

The gain is also adjustable (0 to 100% Sample: 25 euros become real to 100% -> 50 euros securitized). This allows the user to speculate whether or not to do so. This allows the user to transform its capital and more capital represented by shares. (And then convert its shares capital by the sale, eg 50 euros securitized -> 50 euro real). Finally: EUR 25 real -> 50 euro real. This was to be demonstrated.

Economic Explanation: The software is not intended to create inflation.

From what I know, there are two types of inflation:

– Inflation of prices: Higher prices for goods and services during a period of time. (source: Wikipedia) The income increases more slowly as rising commodity prices. → decrease in purchasing power. What is problematic. But what has Give1Get2 is to increase the income of players in the system, thereby increasing purchasing power. There are no services for sale on the platform and use is free. The « products » are selling financial claims payments. The purchase price is determined by the buyers themselves. If they decide to buy more expensive it is to earn more.

– Inflation of the money: When money suffers a global money creation. Money in circulation increases via interest rates. However, the software Give1Get2 not intended to increase the money supply or decrease it. There is no interest rate not in this system. For only the responsibility of banks.

The software allows the movement of money between players.

Financial Explanation:

Consider this example: Bob wants to send 10 cents to EUR Alice via Moneybookers.

Alice to a balance of EUR 10.82. Bob has a balance of EUR 78.19. Bob sending 10 cents to Alice. The balance of Bob becomes 78.09 EUR. The balance goes to Alice 10.92 EUR. This is without counting the cost variables (0.01) and fixed costs (0.29). Ultimately, the balance of Alice is EUR 10.62 at the end of the operation.

People Alice
Before After Before After
Balance 10.82 EUR 10.62 EUR 78.19 EUR 78.09 EUR

We note that the gain (10 cents) is less than the loss (30 cents). Bob was negatively charged (-0.10 EUR, which is normal). Alice was also negatively charged (total EUR -0.20). Thus a lose-lose situation.

For a win-lose, we can establish a minimum quota of money to be set in automatic settings for all purchases through the API. Test: Bob (balance: EUR 78.09), after mature reflection, wants to send Alice to 3 euros (balance: EUR 8.52) via Moneybookers. Bob now has a balance of EUR 75.09. Alice has a balance of approximately EUR 11.12 (8.52 +3.00 -0.10 -0.29).

People Alice
Time Before After Before After
Balance 8.52 EUR 11.12 EUR 78.09 EUR
75.09 EUR

What we are seeing? Bob was negatively charged (EUR -3.00), while Alice was positively charged (difference +2.60 EUR). This is a win-lose.

The trading process works as follows: The seller exchange goods cons money from the buyer. The seller of the property does that against a sum greater than what it cost him at first with these suppliers.

Similarly, when that person A makes a claim and receives money from a person B. This acts as a compensatory mechanism that allows B in turn place a claim for a price equal to or greater than what it cost him to his predecessor.

Traditionally, it is a relationship with 2 people only. The problem if one of the 2 party may pay or reimburse. (Relationship 1 to 1) With this software alternative market, there are multiple suppliers and multiple plaintiffs. (Relation of many to many) So, this reduces the risk (1 to many relationship in 2 directions) and there are more opportunities for success.

As I demonstrate, we can turn a win-lose strategy into a win-win strategy. That’s what we do now.


The software is based on a policy of transparency and sustainable development. The chosen license is the GNU GPL. It is free software. Thus, it has been made freely available on to be downloaded and installed on servers online.

* Download the complete solution directly (the most current): (requires software 7zip)

* Mirror full download (stable):

* [Moneybookers] Demo in action:

* [Moneybookers] The documentation for free download: (not needed)

Software Installation

1. Buy a domain name ( at a Registrar.

2. Getting accommodation containing enough space (approx 50 MB) and sufficient bandwidth (several Giga) depending on the number of users expected. (and POP3, FTP, and MySQL included)

3. De-compress the files previously downloaded. (as above)

4. Edit the file ‘scripts sql tables & champs.sql’: at line 85, replace the email ( and the merchant id (6173206) with your email and your merchant id obtained from moneybookers at the opening of your account. Replace the email as per your email on line 108.

5. Create a database « mocha » (without the double quotes) in your administration panel (usually the URL

Create a user and give access rights to the database for reading and writing. (if not already done automatically).

6. Click the SQL tab, paste the data file ‘scripts sql tables & champs.sql’ in the textbox and click Run. No error message should appear.

7. Change the default values by those who have been provided by the host in the file ‘params.php’ (without the single quotes) line 31 (host), line 32 (user), line 33 (password), line 34 (database)

8. On the web server, copy and paste the modified source (with default settings) in 7z and zip. Also create a folder /give1get2/. Upload files via FTP (ex FireFTP, a Firefox extension) with the parameters of the host ( ‘params.php’) in the directory previously created.

9. Launch the browser The index page should be displayed without an error message. Sources (7z and zip) should be downloadable from a tab ‘literature’ or ‘download’.

10. Suggest your site on search engines (eg

11. Generate an XML sitemap and put it in the root (eg

12. Optimize your website (eg with Google Webmaster Tools)


The only equipment needed is a PC, operating system, Internet connection and web browser.

Multi-platform: runs on Windows or Linux using Internet Explorer or Firefox.
The training is free. It is the documentation.

Designed in XHTML, CSS, JavaScript, PHP and SQL (CRUD). Requires MySQL, phpMyAdmin, POP3 for mail, FTP and a web browser. Has been tested and works with Apache (> = 1.3.33), MySQL (> = 4.1.9), PHP (> = 4.3.10), PhpMyAdmin (> = 2.6.1).

It’s a multitier architecture (data, business logic and presentation). The architecture is based on the project FreePay: To deepen FreePay documentation is available.

For non French-speaking or non English speaking, there are translation tools like Google translate to read documents in your language.

The diagram of treatment processes the merchant side of the financial institution has been copied in an picture in attachment. « moneybookers_payment_gateway_api_details_interaction_diagram.png »

This script is also based on the API documentation « Moneybookers Payment Gateway – Merchant Integration Manual » (in English) – Version: <6.5>. (43 pages) A new version may be out on time or you read these lines, which could cause problems.

The script takes into account that the fields by way of simplification. Regarding the optional fields: refer to official documentation.

The ISIN code is used again in this software (ISO 6166). The codification created the ZZ is to make a clear distinction and there have no ambiguity with the countries or territories with securities, according to ISO 3166-1.

The status of a transaction (statements):

2 : Processed
1 :
Test // status added, not in the documentation
0 :
-1 :
-2 :
-3 :

The Stages of development (How)

Vision: The payment module FreePay and all of the modules below are replaced by the external API Moneybookers (financial institution approved by the FSA).

Consequences: The support payment module is outsourced. The project name no longer matches. The meta tags do not correspond. Menus no longer match.

1. Copy FreePay. All necessary modules are not removed unless the FSX. (+ Check that it works)

2. API Implementation Moneybookers (+ check that it works)

3. Mashup of two (Mashup)
creation of specific interface
creation of specific process
creation of the specific database (+ check that it works through a simulator engine of payment)

4. Re-factoring: Optimization Mashup (+ check that it works)

5. Publication on Internet


The source code is in French. The source code comments are in French too. Except for the financial standards that are in English. The project is oriented towards internationalization (I18N).

All images are in a specific folder (/images).
All CSS (Stylesheets cascading) are in a specific folder (/style).
All that was attractive to user support is in the /support.
The documentation is in the /support /docs.

Everything concerning the internationalization is in the folder named « services/i18n.

The programming style is procedural: the methods are called in a specific order.

The visible part is composed of the main page of the history and documentation.

The existence of a claim can be verified through history.

Restricting access is done through the sessions for the hidden part (payment process).

The availability of a claim can be verified by applying the filter with the ISIN number as parameter.

As a web project, the human-machine interface is based on an architecture is client/server. And the server to a 3-tier architecture (database, processing, presentation).

The database

It is composed of 4 tables per financial institution: ( « scripts sql tables & champs.sql » at the root)

-2 for the securities (already existing in FSX):

– List of past transactions carried on securities.
– List of securities for sale in their current states.

– 2 orders of payments (the before and after):

– List of past orders in the securities of FSX.
– List of payment orders sent by the API.

It is composed of 2 insertions in the tables corresponding to a title and its history.

The stages of payment for a user in FSX

The user has created and supplied a Moneybookers account. (

1. The link to the login page is on the first page top right. The connection is with the email and digital identifier (Customer ID) associated with Moneybookers account.
(Visible beneath the menu in the interface Moneybookers). (No password is managed by Moneybookers upon payment to avoid external recovery)

2. The user goes to the purchase page and a ISIN number (defined as the value and benefit if necessary).

The purchase order is saved and accessible via the menu of the same name. It summarizes the status of the transaction (Active / Standby, Fails / Canceled or Finished).

3. According to the parameters ( « params.php ») defined by the administrator, the user is redirected either:
– On the test server (mb_test_payment.php) and valid
– Or Moneybookers (

The redirection is done through a GET (passing all the required parameters). The solution has been chosen is a javascript redirect. (<script type=’text/javascript’>Code</ script>)

4. If the person given the right parameters, it falls just a password. Otherwise, it creates the account.

5. The payment is reversed or validated by the user. Moneybookers transfer money between the parties. Moneybookers sends a return code « HTTP 200 » POST only the status_url previously sent ( « Payment/pay/status_report.php ») and redirects the user to the platform FSX defined above.

– The software uses a coupling data (parameter passing).

if (isset ($ _POST [ ‘mb_transaction_id’])) ($mb_transaction_id = $ _POST[‘mb_transaction_id’];)

– The data are then filtered for security reasons. ( « status_report_filtre.php ») Verifies that all fields are filled, they have the right kind, good length and good data (technical filtering whitelist).

example: checking that the original data (IP) is really from the financial institution to avoid any fraudulent attempt to send play money. (attack type « man in the middle »)

The amount returned by moneybookers be less than the amount indicated in the reservation (due to the taking of commission (fixed and variable) of the payment platform or GET parameters that can be modified en route by the user). The transfer of ownership of securities is based on new figures sent by the API only to avoid these problems.

6. Then, if all criteria are validated then the data are stored in the table of the api. (+ Current date) and displays as required by the file ‘pay_liste.php’ the customer reflected in his eyes when he returns to Give1Get2.

7. continuing process of transferring ownership (the transaction on hold « pending » changes to « done ») with the transaction number recovered by Moneybookers previously sent)

Each sale of title, money is saved in the accounts of the financial institution. In a crisis (such as unavailability of the platform title), the money, it is always available.

8. The user can see his tracks and refresh the page (F5). It can also use the emailling to expedite the payment process, then:
– The seller receives an email notification informing the FSX the transfer of title and the reception of money. (Transmitter + Silver + currency)
– The buyer receives an email notification from the financial institution. (+ Silver + dollar + product code)

9. Disconnecting the trading platform (FSX)


The architecture views is common FreePay (header and footer together on every page).

Menu: (Home, History of titles, title Buy, Purchase Order (Confirmation is visible if the order was successful) Consult your titles, Contact Us, Documentation)

– The user can see the transaction history.
– The user can buy a ISIN number.
– The user can consult the list of purchase orders and click on the transaction number for details of the transaction (if it succeeded).
– The user can see his tracks.

Compliance with W3C standards: has been validated XHTML 1.0 Transitional and CSS 2.0 in Mozilla Firefox, Internet Explorer and Safari.


These are the same as those of FreePay. PHP and Javascript for the client and server respectively.

Transactions that fail after 1 day were classified as having failed. (status to -2).


The application has been designed and tested CAL9000 (OWASP) to be protected against attacks like Cross Site Scripting (XSS). In the Top 10 vulnerabilities in 2007 by the Open Web Application Security Project (OWASP).

Test and Verify:

The test accounts are opened at the initiative of customers. Funding test are given free Moneybookers.

Pass the following test series: Requires minimum 2 users. (Alice and Bob) Preparation: Note the financial position of existing users: « Balance in Euro » and « Balance of ISIN » for each.

Make a purchase and for 3 cases (less than, equal, higher), check:
– The balance of the buyer (Alice) has he fallen?
– The value of the security of the buyer (Alice) has she grown?
– The balance of the receiver (Bob) has he grown?
– The titles of the receiver (Bob) have decreased?
– The receiver (Bob) as been notified by email?

Next development platform:

FaceBook + Paypal


I think my system is legal because I am doing research in this direction before putting it free. I believe it is in line with the principles of the European Union. ( I joined in the « Support »> « docs » reference documents concerning the legislative, legal and regulatory framework that could be pertinent.

The website of the European Commission is very instructive on this issue. ( Category: European Commission> Internal Market> Single Market for Services> Financial Services. I am not completely agree on the choice of this category since the trading platform offers a free service (without compensation) and does not manage money (only confirmation that the money has been transferred).

Fund investments> Alternative investments: there is a Draft Directive on fund managers known as « alternative. The draft guideline can still be changed, and the final version will not necessarily apply to specific cases.

Payment services> E-Money: The trading platform does not change. So, this concerns only the PSP Moneybookers.

Payment services> e-Invoicing: PSP is Moneybookers which manages billing (it may disable) Only one copy is kept for archive purposes by the trading platform (or nothing depending on the setting)

Financial conglomerates: Depending on the size of the trading system Give1Get2 and structure, it can enter or not enter this category. It is the selection of the contractors as opportunities for merger / acquisitions.

Electronic Business: It depends on what is done by customers in return for money sent.


My copyright is protected by the GNU General Public License.

My creations are protected at European level by Council Directive 91/250/EEC of 14 May 1991 on the legal protection of computer programs. (

My designs are protected internationally by the Berne Convention for the Protection of Literary and Artistic Works (currently managed by the World Intellectual Property Organization (WIPO), specialized agency within the UN). (source:


Using this application value of acceptance of the disclaimer as follows: The author assumes no responsibility for any consequences arising from the use of this application.

Script comes with no warranty.

The Organization

The Indefinite Lifespan Foundation is a nonprofit charitable organization, nongovernmental, dedicated to reducing human mortality, to promote the extension of life expectancy and the pursuit of happiness using mainly preventive medicine, Public health and computer science. (Currently being created)


As a developer, I always look for a way to produce more at lower cost. My motivation is based on the fact that the software works and it is useful. While I agree that the type of communication is more efficient face to face, I acknowledge that I am not always available and so I put up with written documentation. Under a policy of transparency, I also put my resume attached in order to learn who wants my identity and my professional skills (which leaves several ways to contact me). His reading is optional.

Also, I’m open to suggestions for improving the software. If there are bugs, so I can correct them, I must have accurate knowledge. From my experience, to improve a system requires that users can contact the author for improvement of the platform is through positive feedback loops at the initiative of users. This will return to the basic architecture of the next version (which will contain the existing + corrections).

If you have a problem of a financial nature relating to your moneybookers account, please contact Moneybookers customer service.