OpenMAVN / PM

OpenMAVN project management
MIT License
0 stars 3 forks source link

Different currencies for vouchers #106

Open ElenaBelyavskaya opened 4 years ago

ElenaBelyavskaya commented 4 years ago

As an SME, I want to issue vouchers in my local currency. As a mobile user, I want to see prices of vouchers in actual different currencies. Start with following currencies: CHF, EUR, GBP, USD, RUR. Currencies should be mapped to country on the back end.

AC's

  1. ADMIN

1.1. Choose currencies when creating a voucher campaign GIVEN I am logged in as admin in the admin portal WHEN I create a voucher campaign THEN Currency for the voucher price is shown as a separate field (drop-down) AND the Currency drop-down contains the following list of available currencies: CHF, EUR, GBP, USD, RUR** AND a default currency is pre-filled based on the Country field of the company

1.2. Editing Currency value in the voucher campaigns GIVEN GIVEN I am logged in as admin in the admin portal WHEN I open a saved voucher campaign to edit it THEN the Currency field allow editing of the value

1.3. Changing currency in voucher campaign before Start_date GIVEN I am on the Edit Voucher Campaign page And Start_date of the campaign > today THEN the currency for the voucher price should be shown And I should be able to change the currency in the drop-down

1.4. Changing currency in voucher campaign after Start_date GIVEN I am on the Edit Voucher Campaign page And Start_date of the campaign <= today THEN the currency for the voucher price should be shown And I should Not be able to change the currency (the field should be disabled)

  1. MOBILE

2.1. Displaying currencies of voucher prices in list of vouchers (offers) GIVEN I am a mobile user WHEN I open a list of vouchers (offers) THEN I see voucher prices with the currencies according to how they were defined when creating the vouchers

2.2. Displaying currencies of voucher prices in list of My (bought) vouchers GIVEN I am a mobile user WHEN I open a list of My bought vouchers THEN I see voucher prices with the currencies according to how they were defined when creating the vouchers

2.3. Displaying currency of voucher price in voucher details GIVEN I am a mobile user WHEN I open a voucher (offer) details THEN I see the voucher price with the currencies according to how it was defined when creating the voucher

2.4. Displaying currency of voucher price in a bought voucher's details GIVEN I am a mobile user WHEN I open a bought voucher details THEN I see the voucher price with the currencies according to how it was defined when creating the voucher

PAYMENTS

  1. Paying for voucher in a currency of its price GIVEN a voucher is created with price in currency A WHEN a mobile user buys this voucher THEN the purchase should be done in currency A
starkmsu commented 4 years ago

@ElenaBelyavskaya , how do we fill the dropdown for the currencies? What if country's currency is not supported by payment provider that was configured for a partner?

starkmsu commented 4 years ago

@vitaliidasaev , backend would resolve the country from address/geolocation, I suggest to implement getting country supported currencies on the frontend using public API (for example - https://restcountries.eu/rest/v2/alpha/ru)

vitaliidasaev commented 4 years ago

@starkmsu for getting currency by country I will need code of the country in Partner entity. For example "Code2": "CH" or "Code3": "CHE"

MarlonMaercz commented 4 years ago

@starkmsu Please create additional subtasks based on discussion today.

vitaliidasaev commented 4 years ago

@Mamyako @ElenaBelyavskaya moved to Ready for Testing

Mamyako commented 4 years ago

@starkmsu @vitaliidasaev Tere're some notes to this ticket:

  1. A default currency isn’t pre-filled based on the Country field of the company
  2. Currency can’t be chosen before Business unit field set
  3. If Start_date of the campaign > today then I should be able to change the currency in the drop-down, for now field is disabled if campaign is published
  4. GBP and EUR transactions take at least 20 minutes to complete
ElenaBelyavskaya commented 4 years ago

Cannot confirm N3 - always getting "Seems you are not connected" error... @MarlonMaercz, @pddimitrova could you please try too on your devices?

pddimitrova commented 4 years ago

@ElenaBelyavskaya Voucher reservation takes a long time to process on the BE and frequently times out. @starkmsu Have you noticed such tendencies? Moreover, the mobile app does not change in any way in respect to different currencies, just shows them as received. There was no work done for this issue on the mobile app.

vitaliidasaev commented 4 years ago
  1. A default currency isn’t pre-filled based on the Country field of the company

Default currency works when company address is filled correctly and country was successfully determined.

  1. Currency can’t be chosen before Business unit field set

This is correct behaviour, because the list of currencies depends on company configuration.

  1. If Start_date of the campaign > today then I should be able to change the currency in the drop-down, for now field is disabled if campaign is published

Fixed validation for End date and ability to save before Start date

@ElenaBelyavskaya please recheck and confirm.

ElenaBelyavskaya commented 4 years ago

@vitaliidasaev

  1. I agree, but it's worth adding a hint about that's, e.g.: when the company is not selected yet, we show "Select company first" in the Currency field
ElenaBelyavskaya commented 4 years ago

Issue with N3 stands on my end...

vitaliidasaev commented 4 years ago
  1. Added tooltip in the Currency field: "Select Business first" because there was renaming in this story #137