New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement multiple currencies #182

Closed
Changaco opened this Issue Feb 23, 2016 · 32 comments

Comments

4 participants
@Changaco
Member

Changaco commented Feb 23, 2016

I just realized that we didn't actually have an open issue for this, so here it is.

MangoPay currently supports the following currencies in addition to euros: GBP, CAD, SEK, NOK, DKK, CHF, ZAR, PLN, USD, AUD.

Fees become a lot more complicated when we introduce other currencies into the equation.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Feb 23, 2016

Member

I think this is still not a priority (previous statement: #44 (comment)).

Member

Changaco commented Feb 23, 2016

I think this is still not a priority (previous statement: #44 (comment)).

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Jul 22, 2016

Member

I asked MangoPay if they were planning to add support for currency conversion to their API, they said no.

Not having currency conversion means that it would be more likely that a donor could find themselves in the annoying situation of having money in their Liberapay account but still needing to add more because the person they want to give to only accepts other currencies.

Member

Changaco commented Jul 22, 2016

I asked MangoPay if they were planning to add support for currency conversion to their API, they said no.

Not having currency conversion means that it would be more likely that a donor could find themselves in the annoying situation of having money in their Liberapay account but still needing to add more because the person they want to give to only accepts other currencies.

@MartinDelille

This comment has been minimized.

Show comment
Hide comment
@MartinDelille

MartinDelille Jul 22, 2016

Contributor

Would it be possible to rely on another service for conversion?

Contributor

MartinDelille commented Jul 22, 2016

Would it be possible to rely on another service for conversion?

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Jul 22, 2016

Member

Would it be possible to rely on another service for conversion?

Assuming that such a service exists, it would be complicated and probably not instantaneous. There would also be the problem of bypassing MangoPay's fees.

We could allow users to trade currencies between themselves, but that wouldn't guarantee always being able to convert your money when you want to.

Member

Changaco commented Jul 22, 2016

Would it be possible to rely on another service for conversion?

Assuming that such a service exists, it would be complicated and probably not instantaneous. There would also be the problem of bypassing MangoPay's fees.

We could allow users to trade currencies between themselves, but that wouldn't guarantee always being able to convert your money when you want to.

@aggsol

This comment has been minimized.

Show comment
Hide comment
@aggsol

aggsol Feb 9, 2017

Contributor

Does this include Bitcoin (XBT)?

Contributor

aggsol commented Feb 9, 2017

Does this include Bitcoin (XBT)?

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Feb 9, 2017

Member

Does this include Bitcoin (XBT)?

Not directly, but implementing native support of Bitcoins requires multiple currencies accounting. That's why #364 is tagged as Blocked on this issue.

Member

Changaco commented Feb 9, 2017

Does this include Bitcoin (XBT)?

Not directly, but implementing native support of Bitcoins requires multiple currencies accounting. That's why #364 is tagged as Blocked on this issue.

@aggsol

This comment has been minimized.

Show comment
Hide comment
@aggsol

aggsol Mar 21, 2017

Contributor

If the incoming money would always exchanged to Euro then no multiple currency accounting would be necessary. Like the the provider would accept Bitcoin, USD etc. on Liberapays behalf, exchange it to Euros.

Contributor

aggsol commented Mar 21, 2017

If the incoming money would always exchanged to Euro then no multiple currency accounting would be necessary. Like the the provider would accept Bitcoin, USD etc. on Liberapays behalf, exchange it to Euros.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Mar 21, 2017

Member

Automatic currency conversion is built into credit card systems, Liberapay donors whose bank accounts aren't denominated in euros can pay by card. This issue is about implementing multiple currencies in Liberapay itself.

Member

Changaco commented Mar 21, 2017

Automatic currency conversion is built into credit card systems, Liberapay donors whose bank accounts aren't denominated in euros can pay by card. This issue is about implementing multiple currencies in Liberapay itself.

@aggsol

This comment has been minimized.

Show comment
Hide comment
@aggsol

aggsol Oct 12, 2017

Contributor

Just to be clear: Running everything in EUR and just displaying a converted amount in an another currency is not an option?

Contributor

aggsol commented Oct 12, 2017

Just to be clear: Running everything in EUR and just displaying a converted amount in an another currency is not an option?

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Oct 12, 2017

Member

No, we want real support for multiple currencies, it's the big missing piece of our internationalization efforts.

Member

Changaco commented Oct 12, 2017

No, we want real support for multiple currencies, it's the big missing piece of our internationalization efforts.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Oct 12, 2017

Member

The priority is US dollars, and we can start by only supporting one currency per account if that simplifies things.

Member

Changaco commented Oct 12, 2017

The priority is US dollars, and we can start by only supporting one currency per account if that simplifies things.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Oct 12, 2017

Member

I've sent a message to Mangopay asking for clarifications on how exactly billing works for transactions in foreign currencies.

Member

Changaco commented Oct 12, 2017

I've sent a message to Mangopay asking for clarifications on how exactly billing works for transactions in foreign currencies.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Oct 13, 2017

Member

One of the first steps here is to introduce currencies into the DB schema. If https://github.com/samv/pg-currency was still alive it would have been a nice solution.

Member

Changaco commented Oct 13, 2017

One of the first steps here is to introduce currencies into the DB schema. If https://github.com/samv/pg-currency was still alive it would have been a nice solution.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Oct 14, 2017

Member

I see two possibilities:

  • create our own composite type (amount, currency) in SQL
  • use separate currency columns
Member

Changaco commented Oct 14, 2017

I see two possibilities:

  • create our own composite type (amount, currency) in SQL
  • use separate currency columns
@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco
Member

Changaco commented Oct 14, 2017

Regarding exchange rates, I guess we can use the reference rates from the European Central Bank, specifically this XML file which is updated daily around 16:00 CET.

Other options: https://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance.

@Changaco Changaco self-assigned this Oct 14, 2017

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Oct 15, 2017

Member

Regarding mixed-currency situations (e.g. when a European wants to donate to a US-based person), I'm thinking we could have the following user preferences to determine what to do:

  • main_currency
  • accept_foreign_currencies | Accept currencies other than main_currency? If not then the burden is on the donors, which can deter donations but simplifies things for the recipient.

As previously mentioned in #182 (comment) we could also implement currency swapping, and have the following preferences:

  • convert_foreign_currencies | Attempt to automatically swap foreign currencies with users willing to swap in the other direction?
  • trade_currencies | Participate in currency swapping even if convert_foreign_currencies is turned off?
Member

Changaco commented Oct 15, 2017

Regarding mixed-currency situations (e.g. when a European wants to donate to a US-based person), I'm thinking we could have the following user preferences to determine what to do:

  • main_currency
  • accept_foreign_currencies | Accept currencies other than main_currency? If not then the burden is on the donors, which can deter donations but simplifies things for the recipient.

As previously mentioned in #182 (comment) we could also implement currency swapping, and have the following preferences:

  • convert_foreign_currencies | Attempt to automatically swap foreign currencies with users willing to swap in the other direction?
  • trade_currencies | Participate in currency swapping even if convert_foreign_currencies is turned off?
@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Oct 20, 2017

Member

WIP status: 26 commits, 83 files changed, 1291 insertions(+), 698 deletions(-).

Member

Changaco commented Oct 20, 2017

WIP status: 26 commits, 83 files changed, 1291 insertions(+), 698 deletions(-).

This was referenced Oct 26, 2017

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco
Member

Changaco commented Nov 1, 2017

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Nov 1, 2017

Member

Deployment went badly, we have lots of errors, including DB self-check failures.

Member

Changaco commented Nov 1, 2017

Deployment went badly, we have lots of errors, including DB self-check failures.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Nov 1, 2017

Member

I've managed to fix almost everything. The remaining issues aren't critical.

Member

Changaco commented Nov 1, 2017

I've managed to fix almost everything. The remaining issues aren't critical.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Nov 3, 2017

Member

Payments in USD weren't actually working because the currency wasn't enabled in our production account. I contacted mangopay and they've just enabled it.

Member

Changaco commented Nov 3, 2017

Payments in USD weren't actually working because the currency wasn't enabled in our production account. I contacted mangopay and they've just enabled it.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Nov 3, 2017

Member

What should the default currency be once our support of the US dollar has improved and stabilized?

A relevant map: https://en.wikipedia.org/wiki/File:DOLLAR_AND_EURO_IN_THE_WORLD.svg

Member

Changaco commented Nov 3, 2017

What should the default currency be once our support of the US dollar has improved and stabilized?

A relevant map: https://en.wikipedia.org/wiki/File:DOLLAR_AND_EURO_IN_THE_WORLD.svg

@mattbk

This comment has been minimized.

Show comment
Hide comment
@mattbk

mattbk Nov 8, 2017

Contributor

Is this working and documented yet?

Contributor

mattbk commented Nov 8, 2017

Is this working and documented yet?

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Nov 8, 2017

Member

The work isn't complete. I've started writing a blog post to announce the support of USD, but first I need to implement:

  • changing the main_currency and accept_all_currencies settings of one's account
  • proper handling of multiple currencies when adding or withdrawing money
Member

Changaco commented Nov 8, 2017

The work isn't complete. I've started writing a blog post to announce the support of USD, but first I need to implement:

  • changing the main_currency and accept_all_currencies settings of one's account
  • proper handling of multiple currencies when adding or withdrawing money
@mattbk

This comment has been minimized.

Show comment
Hide comment
@mattbk

mattbk Nov 8, 2017

Contributor

Thanks, just trying to keep up.

Contributor

mattbk commented Nov 8, 2017

Thanks, just trying to keep up.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Nov 10, 2017

Member

I've been working on adapting the Giving page to multiple currencies. Here's what I have:

liberapay-2017-11-10-giving-page

Member

Changaco commented Nov 10, 2017

I've been working on adapting the Giving page to multiple currencies. Here's what I have:

liberapay-2017-11-10-giving-page

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco
Member

Changaco commented Dec 2, 2017

Screenshot of the currency settings form I've been working on

@Changaco

This comment has been minimized.

Show comment
Hide comment
Member

Changaco commented Dec 7, 2017

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Dec 7, 2017

Member

Wondering if I should publish now or wait.

Member

Changaco commented Dec 7, 2017

Wondering if I should publish now or wait.

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Dec 7, 2017

Member

Let's call this done and move to new issues for the rest of the work.

Member

Changaco commented Dec 7, 2017

Let's call this done and move to new issues for the rest of the work.

@Changaco Changaco closed this Dec 7, 2017

@Changaco

This comment has been minimized.

Show comment
Hide comment
@Changaco

Changaco Dec 9, 2017

Member

Spanish translation of the blog post by @jorgesumle: Liberapay ya acepta dólares americanos.

Member

Changaco commented Dec 9, 2017

Spanish translation of the blog post by @jorgesumle: Liberapay ya acepta dólares americanos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment