Closed norbertschuler closed 2 years ago
API response here has:
{"treeCost":0.0,"currency":"EUR","effectiveCountry":"DE","requestedCountry":"AQ","gateways":{"stripe":{"isLive":true,"methods":["stripe_cc"],"account":"acct_1DYCMDD2OpW2f42N","recurrency":{"enabled":true,"intervals":["none","daily","weekly","monthly","quarterly","semiyearly","yearly"]},"authorization":{"stripePublishableKey":"pk_live_kgrdlpO8m5OZmfysUTSwbzrd","accountId":"acct_1DYCMDD2OpW2f42N"}}}}
For effective country DE, and the currency EUR, treecost is 0;
The calculation needs to be fixed.
Even if frontend sends country that does not exist, it is job of the backend to return default currency, which it does here, but simply fails in calculation.
Are the rates not being fetched from fixer?
XAF
of Chad TD
to show the minimum donation amount (https://github.com/Plant-for-the-Planet-org/planet-webapp/blob/develop/src/utils/countryCurrency/countryExchangeForMinimumDonationAmount.json) the minimum donation amount is still shown in the EUR currency while the value got converted by the conversion rate which it should not do:
Describe the bug The API call for payment options, e.g. https://app.plant-for-the-planet.org/app/projects/proj_zoj2MAHlXzibgydQbif5CZBo/paymentOptions?country=AQ can reset the chosen currency in the donation popup to EUR, so the selected value of the currency chooser dialog gets changed and this dialog does not display any preselected country+currency anymore. If chosen such a unsupported currency twice, it keeps being displayed with the wrong amounts in EUR until the payment finally fails.
Is it on a Production or Development Build? production
To Reproduce Steps to reproduce the behavior:
Open donation popup for a project
Click on choosing another currency and choose currency of e.g.
Antarctica · AQD
See that currency is reset from
AQD
toEUR
again while tree cost amount is set to0
.Click on choosing another currency again and choose e.g.
Antarctica · AQD
See that currency is now
AQD
See error if trying to pay with chosen unsupported currency
Expected behavior Either remove all unsupported currencies from frontend (check against list of supported currencies from backend) or fix the reset of unsupported currencies in the donation dialog.