From f2f391bd18eda89fb31b2bf7c6abdc4d7f9547c8 Mon Sep 17 00:00:00 2001 From: quantum-grit Date: Sun, 14 Aug 2022 16:23:29 +0300 Subject: [PATCH 1/3] reduced stripe fee from 1.4 to 1.2% for EU --- src/common/hooks/campaigns.ts | 1 + .../one-time-donation/helpers/stripe-fee-calculator.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/hooks/campaigns.ts b/src/common/hooks/campaigns.ts index 08f878f92..77676706c 100644 --- a/src/common/hooks/campaigns.ts +++ b/src/common/hooks/campaigns.ts @@ -21,6 +21,7 @@ export function useCampaignAdminList() { return useQuery( endpoints.campaign.listAdminCampaigns.url, authQueryFnFactory(session?.accessToken), + { enabled: !!session?.accessToken }, ) } diff --git a/src/components/one-time-donation/helpers/stripe-fee-calculator.ts b/src/components/one-time-donation/helpers/stripe-fee-calculator.ts index 27912f80f..ed71ff2f2 100644 --- a/src/components/one-time-donation/helpers/stripe-fee-calculator.ts +++ b/src/components/one-time-donation/helpers/stripe-fee-calculator.ts @@ -24,7 +24,7 @@ export function stripeIncludeFeeCalculator(netAmount: number, region: CardRegion } export function stripeIncludeFeeCalculatorEU(netAmount: number) { - return (netAmount + 50) / (1 - 0.014) + return (netAmount + 50) / (1 - 0.012) } export function stripeIncludeFeeCalculatorUK(netAmount: number) { @@ -47,7 +47,7 @@ export function stripeIncludeFeeCalculatorOther(netAmount: number) { export function stripeFeeCalculator(chargedAmount: number, region: CardRegion) { switch (region) { case CardRegion.EU: { - return chargedAmount * 0.014 + 50 + return chargedAmount * 0.012 + 50 } case CardRegion.UK: { return chargedAmount * 0.025 + 50 From 671293d24a5c7dee21d14b4e9b8a03ae3c596885 Mon Sep 17 00:00:00 2001 From: quantum-grit Date: Mon, 3 Oct 2022 13:07:37 +0300 Subject: [PATCH 2/3] reverted change from another branch --- src/common/hooks/campaigns.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/common/hooks/campaigns.ts b/src/common/hooks/campaigns.ts index 77676706c..08f878f92 100644 --- a/src/common/hooks/campaigns.ts +++ b/src/common/hooks/campaigns.ts @@ -21,7 +21,6 @@ export function useCampaignAdminList() { return useQuery( endpoints.campaign.listAdminCampaigns.url, authQueryFnFactory(session?.accessToken), - { enabled: !!session?.accessToken }, ) } From dc87f81b4d7265ea7d0deac06e45e3ece8c8a791 Mon Sep 17 00:00:00 2001 From: quantum-grit Date: Mon, 3 Oct 2022 13:11:58 +0300 Subject: [PATCH 3/3] added: translations to card region selector --- e2e/staging/anon-donation-fixed.spec.ts | 2 +- public/locales/bg/one-time-donation.json | 9 +++++-- public/locales/en/one-time-donation.json | 7 +++++- .../one-time-donation/steps/FirstStep.tsx | 25 ++++++++++++++----- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/e2e/staging/anon-donation-fixed.spec.ts b/e2e/staging/anon-donation-fixed.spec.ts index 8e4b09e45..422a92a9e 100644 --- a/e2e/staging/anon-donation-fixed.spec.ts +++ b/e2e/staging/anon-donation-fixed.spec.ts @@ -14,7 +14,7 @@ test('test anonymous donation on staging - fixed amount', async ({ page }) => { await page.locator('label:has-text("10 лв.")').click() // Click text=Искам да покрия таксите за плащане с карта издадена в: - await page.locator('text=Искам да покрия таксите за плащане с карта издадена в:').click() + await page.locator('text=Искам да покрия таксата за карта издадена в:').click() // Click text=10,65 лв. await page.locator('text=10,65 лв.').click() diff --git a/public/locales/bg/one-time-donation.json b/public/locales/bg/one-time-donation.json index b2eaaf360..41a418b9d 100644 --- a/public/locales/bg/one-time-donation.json +++ b/public/locales/bg/one-time-donation.json @@ -49,10 +49,15 @@ "third-step": { "title": "Как желаете да дарите?", "card": "Карта", - "card-include-fees": "Искам да покрия таксите за плащане с карта издадена в: ", + "card-include-fees": "Искам да покрия таксата за карта издадена в: ", "card-fees": "При дарение с карта използваме услугите на Stripe, като за всеки трансфер Stripe начисляват такса според региона на картоиздателя ви. За да се ориентирате за нетното дарение, след като изберете желаната сума, ще ви покажем изчислената такса. Повече за таксите от Страйп вижте тук: ", "card-calculated-fees": "За вашия превод от {{totalAmount}}, таксата на Stripe ще е {{fees}}, а кампанията ще получи {{amount}}", - "card-region": "регион", + "card-region": { + "title": "регион", + "EU": "Европа", + "UK": "Великобритания", + "Other": "други" + }, "bank-payment": "Банков превод", "bank-instructions1": "За дарение по банков път, моля използвайте приложението препоръчано от Вашата банка като въведете данните посочени по-долу. Дарението Ви няма да се отрази веднага в системата, тъй като все още предстои разработка на интеграцията с банката.", "bank-instructions2": "Разчитаме на Вас да си направите профил или да ни оставите email на следващaтa стъпкa, за да можем да свържем дарението с Вашия потребителски профил. Благодарим предварително!!!", diff --git a/public/locales/en/one-time-donation.json b/public/locales/en/one-time-donation.json index 284113a55..ddc67c85f 100644 --- a/public/locales/en/one-time-donation.json +++ b/public/locales/en/one-time-donation.json @@ -52,7 +52,12 @@ "card-include-fees": "I want to cover transaction fees for card issued in:", "card-fees": "For donations by card we use the services of Stripe and for every transfer they charge a fee depending on region of your card issuer. To orient you about the net donation, after you choose the desired amount, we will show you the calculated fee below. More details for Stripe fees can be found here: ", "card-calculated-fees": "For your donation of {{amount}}, the fee from Stripe will be {{fees}}, and the total charged amount will be {{totalAmount}}", - "card-region": "region", + "card-region": { + "title": "region", + "EU": "Europe", + "UK": "Great Britain", + "Other": "other" + }, "bank-payment": "Bank transfer", "bank-instructions1": "To donate via bank transfer, please use your bank recommonded application with entering our bank details from below. The donation will not be updated immediatelly as the implemnetation of the automated bank integration is still pending.", "bank-instructions2": "We trust you to register or to leave an email on the next step, so that we can link your donation to your account. Thank you!!!", diff --git a/src/components/one-time-donation/steps/FirstStep.tsx b/src/components/one-time-donation/steps/FirstStep.tsx index 26a94e523..9103418e9 100644 --- a/src/components/one-time-donation/steps/FirstStep.tsx +++ b/src/components/one-time-donation/steps/FirstStep.tsx @@ -206,7 +206,7 @@ export default function FirstStep() { {amount.value ? ( - + - +