Add EN/UK/PL translations to pricing.php
All pricing page content now flows through dbnToolsT() with 65 new keys added to i18n.php for all four languages (no/en/uk/pl). A language switcher pill bar is added at the top of the page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -135,6 +135,71 @@ function dbnToolsTranslations(): array
|
||||
'my_docs_source_ai' => 'AI Chat',
|
||||
'my_docs_source_tools' => 'Tools',
|
||||
'loading' => 'Loading…',
|
||||
'pricing_title_meta' => 'Pricing — Do Better Norge tools',
|
||||
'pricing_desc_meta' => 'Pricing for tools.dobetternorge.no: free tier, subscriptions, and credit top-ups. Build your own case with private RAG.',
|
||||
'pricing_eyebrow' => 'Do Better Norge — tools',
|
||||
'pricing_hero_title' => 'Build your own case. Use the full toolkit.',
|
||||
'pricing_hero_sub' => '13 AI tools for child-welfare cases. Upload your own documents and let the tools work on your private case — not just generic law.',
|
||||
'pricing_status_success' => 'Thank you! Your payment is confirmed. It may take a few seconds for your account to update.',
|
||||
'pricing_status_canceled' => 'Checkout was cancelled. You can try again any time.',
|
||||
'pricing_survey_title' => 'Earn 25 extra credits',
|
||||
'pricing_survey_text' => 'Answer 5 short questions about what helps you most. No sales pitch — just research that helps us improve the tools.',
|
||||
'pricing_survey_cta' => 'Take the survey',
|
||||
'pricing_period_always' => 'always',
|
||||
'pricing_period_mo' => '/ month',
|
||||
'pricing_credits_mo' => 'credits / month',
|
||||
'pricing_no_storage' => 'No case storage',
|
||||
'pricing_seat_1' => '1 seat',
|
||||
'pricing_seats_family' => '3 seats (family)',
|
||||
'pricing_cap_suffix' => 'tools/hr',
|
||||
'pricing_cap_per_seat' => 'tools/hr per seat',
|
||||
'pricing_unlimited' => 'Unlimited',
|
||||
'pricing_free_f1' => 'Access to all 13 tools',
|
||||
'pricing_free_f2' => 'Questions, search, editing',
|
||||
'pricing_free_f3' => 'Correspondence drafts',
|
||||
'pricing_light_f1' => 'Everything in Free',
|
||||
'pricing_light_f2' => 'Build your own case (My Case)',
|
||||
'pricing_light_f3' => 'Private document RAG in all tools',
|
||||
'pricing_light_f4' => 'OCR on uploaded PDFs',
|
||||
'pricing_pro_f1' => 'Everything in Light',
|
||||
'pricing_pro_f2' => 'Hybrid search (BM25 + vector) in your case',
|
||||
'pricing_pro_f3' => 'Priority queue for uploads',
|
||||
'pricing_pro_f4' => 'Timeline report on your case',
|
||||
'pricing_proplus_f1' => 'Everything in Pro',
|
||||
'pricing_proplus_f2' => 'Invite 2 family members or a lawyer',
|
||||
'pricing_proplus_f3' => 'Shared case archive with audit log',
|
||||
'pricing_proplus_f4' => 'Unlimited case reports',
|
||||
'pricing_badge_popular' => 'Most popular',
|
||||
'pricing_badge_family' => 'For families',
|
||||
'pricing_cta_login' => 'Sign in to start',
|
||||
'pricing_cta_current' => 'Your current plan',
|
||||
'pricing_cta_available' => 'Available',
|
||||
'pricing_cta_subscribe' => 'Sign in to subscribe',
|
||||
'pricing_cta_choose' => 'Choose',
|
||||
'pricing_topup_title' => 'Top up credits',
|
||||
'pricing_topup_lead' => 'Need more credits this month? Buy a one-off pack — they never expire.',
|
||||
'pricing_topup_s_note' => 'Quick boost',
|
||||
'pricing_topup_m_note' => 'Best value',
|
||||
'pricing_topup_l_note' => 'Heavy users',
|
||||
'pricing_topup_buy' => 'Buy',
|
||||
'pricing_login_first' => 'Sign in first',
|
||||
'pricing_faq_title' => 'Frequently asked questions',
|
||||
'pricing_faq1_q' => 'What is the difference between monthly credits and bonus credits?',
|
||||
'pricing_faq1_a' => 'Monthly credits (from subscription or free tier) reset on the first of each month. Bonus credits (from the survey or top-ups) never expire and are used after monthly credits run out.',
|
||||
'pricing_faq2_q' => 'What is My Case?',
|
||||
'pricing_faq2_a' => 'My Case is your private document bank. Upload PDFs from your case; they are OCR-processed, analysed, and stored in your own secure corpus. All tools can then reference your own documents instead of just generic law.',
|
||||
'pricing_faq3_q' => 'Where is my data stored?',
|
||||
'pricing_faq3_a' => 'All within the EU: servers in Falkenstein (Germany) and Helsinki (Finland), AI services in West Europe and Norway East. We use Hetzner and Microsoft Azure for AI. Stripe processes payments through Ireland.',
|
||||
'pricing_faq4_q' => 'Can I share an account with my lawyer?',
|
||||
'pricing_faq4_a' => 'Yes — Pro+ Family includes 3 seats. You can invite a lawyer, co-parent, or other family member. Everyone sees the same documents, but who did what is logged.',
|
||||
'pricing_faq5_q' => 'What happens if I cancel?',
|
||||
'pricing_faq5_a' => 'You revert to the free tier. Your bonus credits are kept. Documents in My Case are retained for 90 days before deletion — giving you time to export or renew.',
|
||||
'pricing_faq6_q' => 'Do you offer refunds?',
|
||||
'pricing_faq6_a' => 'Yes, full refund within 7 days if you are not satisfied. Send us an email.',
|
||||
'pricing_connecting' => 'Connecting…',
|
||||
'pricing_error_retry' => 'Error — try again',
|
||||
'pricing_error_checkout' => 'Could not start checkout.',
|
||||
'pricing_credits_label' => 'credits',
|
||||
],
|
||||
'no' => [
|
||||
'meta_title' => 'Do Better Norge - juridiske AI-verktøy',
|
||||
@@ -203,6 +268,71 @@ function dbnToolsTranslations(): array
|
||||
'my_docs_source_ai' => 'AI-chat',
|
||||
'my_docs_source_tools' => 'Verktøy',
|
||||
'loading' => 'Laster…',
|
||||
'pricing_title_meta' => 'Priser — Do Better Norge verktøy',
|
||||
'pricing_desc_meta' => 'Priser for tools.dobetternorge.no: gratis tier, abonnementer og kreditt-topp-opp. Bygg din egen sak med privat RAG.',
|
||||
'pricing_eyebrow' => 'Do Better Norge — verktøy',
|
||||
'pricing_hero_title' => 'Bygg din egen sak. Bruk hele verktøyboksen.',
|
||||
'pricing_hero_sub' => '13 AI-verktøy for barnevernssaker. Last opp dine egne dokumenter, og la verktøyene jobbe på din private sak — ikke bare generisk lov.',
|
||||
'pricing_status_success' => 'Takk! Din betaling er bekreftet. Det kan ta noen sekunder før kontoen oppdateres.',
|
||||
'pricing_status_canceled' => 'Kassen ble avbrutt. Du kan prøve igjen når som helst.',
|
||||
'pricing_survey_title' => 'Tjen 25 ekstra kreditter',
|
||||
'pricing_survey_text' => 'Svar på 5 korte spørsmål om hva som hjelper deg mest. Ingen salgspitch — bare research som hjelper oss å forbedre verktøyene.',
|
||||
'pricing_survey_cta' => 'Ta undersøkelsen',
|
||||
'pricing_period_always' => 'alltid',
|
||||
'pricing_period_mo' => '/ måned',
|
||||
'pricing_credits_mo' => 'kreditter / måned',
|
||||
'pricing_no_storage' => 'Ingen sak-lagring',
|
||||
'pricing_seat_1' => '1 plass',
|
||||
'pricing_seats_family' => '3 plasser (familie)',
|
||||
'pricing_cap_suffix' => 'verktøy/time',
|
||||
'pricing_cap_per_seat' => 'verktøy/time per plass',
|
||||
'pricing_unlimited' => 'Ubegrenset',
|
||||
'pricing_free_f1' => 'Tilgang til alle 13 verktøy',
|
||||
'pricing_free_f2' => 'Spørsmål, søk, redaksjon',
|
||||
'pricing_free_f3' => 'Korrespondanse-utkast',
|
||||
'pricing_light_f1' => 'Alt i Gratis',
|
||||
'pricing_light_f2' => 'Bygg din egen sak (Min Sak)',
|
||||
'pricing_light_f3' => 'Privat dokument-RAG i alle verktøy',
|
||||
'pricing_light_f4' => 'OCR på opplastede PDF-er',
|
||||
'pricing_pro_f1' => 'Alt i Light',
|
||||
'pricing_pro_f2' => 'Hybrid søk (BM25 + vektor) i din sak',
|
||||
'pricing_pro_f3' => 'Prioritert kø ved opplasting',
|
||||
'pricing_pro_f4' => 'Tidslinje-rapport på saken din',
|
||||
'pricing_proplus_f1' => 'Alt i Pro',
|
||||
'pricing_proplus_f2' => 'Inviter 2 familiemedlemmer eller advokat',
|
||||
'pricing_proplus_f3' => 'Delt sak-arkiv med revisjonslogg',
|
||||
'pricing_proplus_f4' => 'Ubegrensede saksrapporter',
|
||||
'pricing_badge_popular' => 'Mest populær',
|
||||
'pricing_badge_family' => 'For familier',
|
||||
'pricing_cta_login' => 'Logg inn for å starte',
|
||||
'pricing_cta_current' => 'Din nåværende plan',
|
||||
'pricing_cta_available' => 'Tilgjengelig',
|
||||
'pricing_cta_subscribe' => 'Logg inn for å abonnere',
|
||||
'pricing_cta_choose' => 'Velg',
|
||||
'pricing_topup_title' => 'Topp opp kreditter',
|
||||
'pricing_topup_lead' => 'Trenger du flere kreditter denne måneden? Kjøp en engangspakke — de utløper aldri.',
|
||||
'pricing_topup_s_note' => 'Impulskjøp',
|
||||
'pricing_topup_m_note' => 'Beste verdi',
|
||||
'pricing_topup_l_note' => 'Tunge brukere',
|
||||
'pricing_topup_buy' => 'Kjøp',
|
||||
'pricing_login_first' => 'Logg inn først',
|
||||
'pricing_faq_title' => 'Ofte stilte spørsmål',
|
||||
'pricing_faq1_q' => 'Hva er forskjellen mellom månedlige kreditter og bonuskreditter?',
|
||||
'pricing_faq1_a' => 'Månedlige kreditter (fra abonnement eller gratis tier) tilbakestilles første hver måned. Bonuskreditter (fra undersøkelsen eller topp-opp) utløper aldri og brukes etter de månedlige er oppbrukt.',
|
||||
'pricing_faq2_q' => 'Hva er Min Sak?',
|
||||
'pricing_faq2_a' => 'Min Sak er din private dokumentbank. Last opp PDF-er fra saken din, så blir de OCR-ert, analysert og lagret i din egen sikre korpus. Alle verktøyene kan deretter referere til dine egne dokumenter i stedet for bare generisk lov.',
|
||||
'pricing_faq3_q' => 'Hvor er dataene mine lagret?',
|
||||
'pricing_faq3_a' => 'Alt innenfor EU: servere i Falkenstein (Tyskland) og Helsinki (Finland), AI-tjenester i Vest-Europa og Norge Øst. Vi er hostet hos Hetzner og bruker Microsoft Azure for AI. Stripe behandler betalinger gjennom Irland.',
|
||||
'pricing_faq4_q' => 'Kan jeg dele en konto med advokaten min?',
|
||||
'pricing_faq4_a' => 'Ja — Pro+ Familie inkluderer 3 plasser. Du kan invitere advokat, samboer eller en annen familiemedlem. Alle ser de samme dokumentene, men hvem som gjorde hva blir logget.',
|
||||
'pricing_faq5_q' => 'Hva skjer hvis jeg sier opp?',
|
||||
'pricing_faq5_a' => 'Du faller tilbake til gratis-tier. Bonuskredittene dine beholdes. Dokumentene i Min Sak oppbevares i 90 dager før de slettes — så du har tid til å eksportere dem eller fornye.',
|
||||
'pricing_faq6_q' => 'Tilbyr dere refusjon?',
|
||||
'pricing_faq6_a' => 'Ja, full refusjon innen 7 dager hvis du ikke er fornøyd. Send oss en e-post.',
|
||||
'pricing_connecting' => 'Kobler til...',
|
||||
'pricing_error_retry' => 'Feil — prøv igjen',
|
||||
'pricing_error_checkout' => 'Kunne ikke starte kassen.',
|
||||
'pricing_credits_label' => 'kreditter',
|
||||
],
|
||||
'uk' => [
|
||||
'meta_title' => 'Do Better Norge - юридичні AI інструменти',
|
||||
@@ -271,6 +401,71 @@ function dbnToolsTranslations(): array
|
||||
'my_docs_source_ai' => 'AI-чат',
|
||||
'my_docs_source_tools' => 'Інструменти',
|
||||
'loading' => 'Завантаження…',
|
||||
'pricing_title_meta' => 'Ціни — інструменти Do Better Norge',
|
||||
'pricing_desc_meta' => 'Ціни на tools.dobetternorge.no: безкоштовний рівень, підписки та поповнення кредитів. Побудуйте свою власну справу з приватним RAG.',
|
||||
'pricing_eyebrow' => 'Do Better Norge — інструменти',
|
||||
'pricing_hero_title' => 'Побудуйте власну справу. Використовуйте весь набір інструментів.',
|
||||
'pricing_hero_sub' => '13 AI-інструментів для справ із захисту дітей. Завантажте власні документи й дозвольте інструментам працювати з вашою приватною справою — не лише з загальним законодавством.',
|
||||
'pricing_status_success' => 'Дякуємо! Ваш платіж підтверджено. Оновлення облікового запису може зайняти кілька секунд.',
|
||||
'pricing_status_canceled' => 'Оплату скасовано. Ви можете спробувати ще раз у будь-який час.',
|
||||
'pricing_survey_title' => 'Отримайте 25 додаткових кредитів',
|
||||
'pricing_survey_text' => 'Дайте відповідь на 5 коротких запитань про те, що допомагає вам найбільше. Без реклами — лише дослідження, що допоможе нам покращити інструменти.',
|
||||
'pricing_survey_cta' => 'Пройти опитування',
|
||||
'pricing_period_always' => 'завжди',
|
||||
'pricing_period_mo' => '/ місяць',
|
||||
'pricing_credits_mo' => 'кредитів / місяць',
|
||||
'pricing_no_storage' => 'Без зберігання справи',
|
||||
'pricing_seat_1' => '1 місце',
|
||||
'pricing_seats_family' => '3 місця (сім\'я)',
|
||||
'pricing_cap_suffix' => 'інстр./год',
|
||||
'pricing_cap_per_seat' => 'інстр./год на місце',
|
||||
'pricing_unlimited' => 'Без обмежень',
|
||||
'pricing_free_f1' => 'Доступ до всіх 13 інструментів',
|
||||
'pricing_free_f2' => 'Запити, пошук, редагування',
|
||||
'pricing_free_f3' => 'Чернетки кореспонденції',
|
||||
'pricing_light_f1' => 'Все з Безкоштовного',
|
||||
'pricing_light_f2' => 'Побудуйте власну справу (Моя справа)',
|
||||
'pricing_light_f3' => 'Приватний RAG документів у всіх інструментах',
|
||||
'pricing_light_f4' => 'OCR завантажених PDF',
|
||||
'pricing_pro_f1' => 'Все з Light',
|
||||
'pricing_pro_f2' => 'Гібридний пошук (BM25 + вектор) у вашій справі',
|
||||
'pricing_pro_f3' => 'Пріоритетна черга завантаження',
|
||||
'pricing_pro_f4' => 'Звіт-хронологія вашої справи',
|
||||
'pricing_proplus_f1' => 'Все з Pro',
|
||||
'pricing_proplus_f2' => 'Запросіть 2 членів сім\'ї або адвоката',
|
||||
'pricing_proplus_f3' => 'Спільний архів справи з журналом аудиту',
|
||||
'pricing_proplus_f4' => 'Необмежені звіти по справі',
|
||||
'pricing_badge_popular' => 'Найпопулярніший',
|
||||
'pricing_badge_family' => 'Для сімей',
|
||||
'pricing_cta_login' => 'Увійти для початку',
|
||||
'pricing_cta_current' => 'Ваш поточний план',
|
||||
'pricing_cta_available' => 'Доступно',
|
||||
'pricing_cta_subscribe' => 'Увійти для підписки',
|
||||
'pricing_cta_choose' => 'Обрати',
|
||||
'pricing_topup_title' => 'Поповнити кредити',
|
||||
'pricing_topup_lead' => 'Потрібно більше кредитів цього місяця? Придбайте разовий пакет — вони ніколи не закінчуються.',
|
||||
'pricing_topup_s_note' => 'Швидке поповнення',
|
||||
'pricing_topup_m_note' => 'Найкраща цінність',
|
||||
'pricing_topup_l_note' => 'Активні користувачі',
|
||||
'pricing_topup_buy' => 'Купити',
|
||||
'pricing_login_first' => 'Спочатку увійдіть',
|
||||
'pricing_faq_title' => 'Поширені запитання',
|
||||
'pricing_faq1_q' => 'У чому різниця між місячними кредитами та бонусними кредитами?',
|
||||
'pricing_faq1_a' => 'Місячні кредити (з підписки або безкоштовного рівня) скидаються першого числа кожного місяця. Бонусні кредити (з опитування або поповнення) ніколи не закінчуються і використовуються після вичерпання місячних.',
|
||||
'pricing_faq2_q' => 'Що таке Моя справа?',
|
||||
'pricing_faq2_a' => 'Моя справа — ваш приватний банк документів. Завантажте PDF-файли зі своєї справи; вони пройдуть OCR-обробку, аналіз і будуть збережені у вашому власному захищеному корпусі. Усі інструменти зможуть посилатися на ваші власні документи замість загального законодавства.',
|
||||
'pricing_faq3_q' => 'Де зберігаються мої дані?',
|
||||
'pricing_faq3_a' => 'Все в межах ЄС: сервери у Фалькенштайні (Німеччина) та Гельсінкі (Фінляндія), AI-сервіси в Західній Європі та Норвегії Схід. Ми використовуємо Hetzner і Microsoft Azure для AI. Stripe обробляє платежі через Ірландію.',
|
||||
'pricing_faq4_q' => 'Чи можу я поділитися обліковим записом зі своїм адвокатом?',
|
||||
'pricing_faq4_a' => 'Так — Pro+ Сім\'я включає 3 місця. Ви можете запросити адвоката, другого з батьків або іншого члена сім\'ї. Всі бачать одні й ті самі документи, але хто що зробив — фіксується.',
|
||||
'pricing_faq5_q' => 'Що станеться, якщо я скасую підписку?',
|
||||
'pricing_faq5_a' => 'Ви повернетеся до безкоштовного рівня. Ваші бонусні кредити збережуться. Документи в Моїй справі зберігатимуться 90 днів перед видаленням — щоб ви мали час їх експортувати або поновити підписку.',
|
||||
'pricing_faq6_q' => 'Чи є повернення коштів?',
|
||||
'pricing_faq6_a' => 'Так, повне повернення протягом 7 днів, якщо ви незадоволені. Напишіть нам електронного листа.',
|
||||
'pricing_connecting' => 'Підключення…',
|
||||
'pricing_error_retry' => 'Помилка — спробуйте ще раз',
|
||||
'pricing_error_checkout' => 'Не вдалося розпочати оплату.',
|
||||
'pricing_credits_label' => 'кредитів',
|
||||
],
|
||||
'pl' => [
|
||||
'meta_title' => 'Do Better Norge - prawne narzędzia AI',
|
||||
@@ -339,6 +534,71 @@ function dbnToolsTranslations(): array
|
||||
'my_docs_source_ai' => 'Czat AI',
|
||||
'my_docs_source_tools' => 'Narzędzia',
|
||||
'loading' => 'Ładowanie…',
|
||||
'pricing_title_meta' => 'Cennik — narzędzia Do Better Norge',
|
||||
'pricing_desc_meta' => 'Cennik tools.dobetternorge.no: bezpłatny poziom, subskrypcje i doładowania kredytów. Zbuduj własną sprawę z prywatnym RAG.',
|
||||
'pricing_eyebrow' => 'Do Better Norge — narzędzia',
|
||||
'pricing_hero_title' => 'Zbuduj własną sprawę. Korzystaj z pełnego zestawu narzędzi.',
|
||||
'pricing_hero_sub' => '13 narzędzi AI dla spraw dotyczących ochrony dzieci. Prześlij własne dokumenty i pozwól narzędziom pracować na Twojej prywatnej sprawie — nie tylko na ogólnych przepisach.',
|
||||
'pricing_status_success' => 'Dziękujemy! Twoja płatność została potwierdzona. Aktualizacja konta może potrwać kilka sekund.',
|
||||
'pricing_status_canceled' => 'Płatność została anulowana. Możesz spróbować ponownie w dowolnym momencie.',
|
||||
'pricing_survey_title' => 'Zdobądź 25 dodatkowych kredytów',
|
||||
'pricing_survey_text' => 'Odpowiedz na 5 krótkich pytań o to, co najbardziej Ci pomaga. Żadnej reklamy — tylko badania, które pomagają nam ulepszać narzędzia.',
|
||||
'pricing_survey_cta' => 'Wypełnij ankietę',
|
||||
'pricing_period_always' => 'zawsze',
|
||||
'pricing_period_mo' => '/ miesiąc',
|
||||
'pricing_credits_mo' => 'kredytów / miesiąc',
|
||||
'pricing_no_storage' => 'Brak przechowywania sprawy',
|
||||
'pricing_seat_1' => '1 miejsce',
|
||||
'pricing_seats_family' => '3 miejsca (rodzina)',
|
||||
'pricing_cap_suffix' => 'narzędzi/godz',
|
||||
'pricing_cap_per_seat' => 'narzędzi/godz na miejsce',
|
||||
'pricing_unlimited' => 'Bez limitu',
|
||||
'pricing_free_f1' => 'Dostęp do wszystkich 13 narzędzi',
|
||||
'pricing_free_f2' => 'Pytania, wyszukiwanie, edycja',
|
||||
'pricing_free_f3' => 'Szkice korespondencji',
|
||||
'pricing_light_f1' => 'Wszystko z Bezpłatnego',
|
||||
'pricing_light_f2' => 'Zbuduj własną sprawę (Moja sprawa)',
|
||||
'pricing_light_f3' => 'Prywatny RAG dokumentów we wszystkich narzędziach',
|
||||
'pricing_light_f4' => 'OCR przesłanych plików PDF',
|
||||
'pricing_pro_f1' => 'Wszystko z Light',
|
||||
'pricing_pro_f2' => 'Wyszukiwanie hybrydowe (BM25 + wektor) w Twojej sprawie',
|
||||
'pricing_pro_f3' => 'Priorytetowa kolejka przesyłania',
|
||||
'pricing_pro_f4' => 'Raport osi czasu Twojej sprawy',
|
||||
'pricing_proplus_f1' => 'Wszystko z Pro',
|
||||
'pricing_proplus_f2' => 'Zaproś 2 członków rodziny lub prawnika',
|
||||
'pricing_proplus_f3' => 'Wspólne archiwum sprawy z dziennikiem audytu',
|
||||
'pricing_proplus_f4' => 'Nieograniczone raporty dotyczące sprawy',
|
||||
'pricing_badge_popular' => 'Najpopularniejszy',
|
||||
'pricing_badge_family' => 'Dla rodzin',
|
||||
'pricing_cta_login' => 'Zaloguj, aby zacząć',
|
||||
'pricing_cta_current' => 'Twój obecny plan',
|
||||
'pricing_cta_available' => 'Dostępne',
|
||||
'pricing_cta_subscribe' => 'Zaloguj, aby subskrybować',
|
||||
'pricing_cta_choose' => 'Wybierz',
|
||||
'pricing_topup_title' => 'Doładuj kredyty',
|
||||
'pricing_topup_lead' => 'Potrzebujesz więcej kredytów w tym miesiącu? Kup jednorazowy pakiet — nigdy nie wygasają.',
|
||||
'pricing_topup_s_note' => 'Szybkie doładowanie',
|
||||
'pricing_topup_m_note' => 'Najlepsza wartość',
|
||||
'pricing_topup_l_note' => 'Intensywni użytkownicy',
|
||||
'pricing_topup_buy' => 'Kup',
|
||||
'pricing_login_first' => 'Najpierw się zaloguj',
|
||||
'pricing_faq_title' => 'Często zadawane pytania',
|
||||
'pricing_faq1_q' => 'Jaka jest różnica między miesięcznymi kredytami a kredytami bonusowymi?',
|
||||
'pricing_faq1_a' => 'Miesięczne kredyty (z subskrypcji lub bezpłatnego poziomu) resetują się pierwszego dnia każdego miesiąca. Kredyty bonusowe (z ankiety lub doładowań) nigdy nie wygasają i są używane po wyczerpaniu miesięcznych.',
|
||||
'pricing_faq2_q' => 'Co to jest Moja sprawa?',
|
||||
'pricing_faq2_a' => 'Moja sprawa to Twój prywatny bank dokumentów. Prześlij pliki PDF ze swojej sprawy; zostaną one przetworzone przez OCR, przeanalizowane i zapisane w Twoim własnym bezpiecznym korpusie. Wszystkie narzędzia będą mogły odwoływać się do Twoich własnych dokumentów zamiast ogólnych przepisów.',
|
||||
'pricing_faq3_q' => 'Gdzie przechowywane są moje dane?',
|
||||
'pricing_faq3_a' => 'Wszystko w UE: serwery w Falkenstein (Niemcy) i Helsinkach (Finlandia), usługi AI w Europie Zachodniej i Norwegii Wschodniej. Korzystamy z Hetzner i Microsoft Azure dla AI. Stripe przetwarza płatności przez Irlandię.',
|
||||
'pricing_faq4_q' => 'Czy mogę udostępnić konto swojemu prawnikowi?',
|
||||
'pricing_faq4_a' => 'Tak — Pro+ Rodzina obejmuje 3 miejsca. Możesz zaprosić prawnika, drugiego rodzica lub innego członka rodziny. Wszyscy widzą te same dokumenty, ale kto co zrobił jest rejestrowane.',
|
||||
'pricing_faq5_q' => 'Co się stanie, jeśli anuluję subskrypcję?',
|
||||
'pricing_faq5_a' => 'Powrócisz do bezpłatnego poziomu. Twoje kredyty bonusowe zostaną zachowane. Dokumenty w Mojej sprawie będą przechowywane przez 90 dni przed usunięciem — masz czas na eksport lub odnowienie.',
|
||||
'pricing_faq6_q' => 'Czy oferujecie zwroty?',
|
||||
'pricing_faq6_a' => 'Tak, pełny zwrot w ciągu 7 dni, jeśli nie jesteś zadowolony. Wyślij nam e-mail.',
|
||||
'pricing_connecting' => 'Łączenie…',
|
||||
'pricing_error_retry' => 'Błąd — spróbuj ponownie',
|
||||
'pricing_error_checkout' => 'Nie można uruchomić płatności.',
|
||||
'pricing_credits_label' => 'kredytów',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
+123
-94
@@ -16,83 +16,99 @@ $status = (string)($_GET['status'] ?? '');
|
||||
$loginUrl = 'https://dobetternorge.no/tools-login.php?return=' . urlencode('/pricing.php');
|
||||
$surveyUrl = 'https://dobetternorge.no/survey.php';
|
||||
|
||||
function pt(string $key, string $lang): string {
|
||||
return htmlspecialchars(dbnToolsT($key, $lang));
|
||||
}
|
||||
|
||||
$tierNames = [
|
||||
'free' => $uiLang === 'no' ? 'Gratis' : ($uiLang === 'uk' ? 'Безкоштовно' : ($uiLang === 'pl' ? 'Bezpłatnie' : 'Free')),
|
||||
'light' => 'Light',
|
||||
'pro' => 'Pro',
|
||||
'pro_plus' => $uiLang === 'no' ? 'Pro+ Familie' : ($uiLang === 'uk' ? 'Pro+ Сім\'я' : ($uiLang === 'pl' ? 'Pro+ Rodzina' : 'Pro+ Family')),
|
||||
];
|
||||
|
||||
$tiers = [
|
||||
[
|
||||
'sku' => 'free',
|
||||
'name' => 'Gratis',
|
||||
'price' => '€0',
|
||||
'period' => 'alltid',
|
||||
'credits' => '30 kreditter / måned',
|
||||
'storage' => 'Ingen sak-lagring',
|
||||
'seats' => '1 plass',
|
||||
'cap' => '10 verktøy/time',
|
||||
'sku' => 'free',
|
||||
'name' => $tierNames['free'],
|
||||
'price' => '€0',
|
||||
'period' => dbnToolsT('pricing_period_always', $uiLang),
|
||||
'credits' => '30 ' . dbnToolsT('pricing_credits_mo', $uiLang),
|
||||
'storage' => dbnToolsT('pricing_no_storage', $uiLang),
|
||||
'seats' => dbnToolsT('pricing_seat_1', $uiLang),
|
||||
'cap' => '10 ' . dbnToolsT('pricing_cap_suffix', $uiLang),
|
||||
'features' => [
|
||||
'Tilgang til alle 13 verktøy',
|
||||
'Spørsmål, søk, redaksjon',
|
||||
'Korrespondanse-utkast',
|
||||
dbnToolsT('pricing_free_f1', $uiLang),
|
||||
dbnToolsT('pricing_free_f2', $uiLang),
|
||||
dbnToolsT('pricing_free_f3', $uiLang),
|
||||
],
|
||||
'cta' => $isAuthed ? null : 'Logg inn for å starte',
|
||||
'cta' => $isAuthed ? null : dbnToolsT('pricing_cta_login', $uiLang),
|
||||
'highlight' => false,
|
||||
],
|
||||
[
|
||||
'sku' => 'light',
|
||||
'name' => 'Light',
|
||||
'price' => '€9',
|
||||
'period' => '/ måned',
|
||||
'credits' => '120 kreditter / måned',
|
||||
'storage' => '100 MB sak-lagring',
|
||||
'seats' => '1 plass',
|
||||
'cap' => '15 verktøy/time',
|
||||
'sku' => 'light',
|
||||
'name' => $tierNames['light'],
|
||||
'price' => '€9',
|
||||
'period' => dbnToolsT('pricing_period_mo', $uiLang),
|
||||
'credits' => '120 ' . dbnToolsT('pricing_credits_mo', $uiLang),
|
||||
'storage' => '100 MB',
|
||||
'seats' => dbnToolsT('pricing_seat_1', $uiLang),
|
||||
'cap' => '15 ' . dbnToolsT('pricing_cap_suffix', $uiLang),
|
||||
'features' => [
|
||||
'Alt i Gratis',
|
||||
'Bygg din egen sak (Min Sak)',
|
||||
'Privat dokument-RAG i alle verktøy',
|
||||
'OCR på opplastede PDF-er',
|
||||
dbnToolsT('pricing_light_f1', $uiLang),
|
||||
dbnToolsT('pricing_light_f2', $uiLang),
|
||||
dbnToolsT('pricing_light_f3', $uiLang),
|
||||
dbnToolsT('pricing_light_f4', $uiLang),
|
||||
],
|
||||
'highlight' => false,
|
||||
],
|
||||
[
|
||||
'sku' => 'pro',
|
||||
'name' => 'Pro',
|
||||
'price' => '€29',
|
||||
'period' => '/ måned',
|
||||
'credits' => '500 kreditter / måned',
|
||||
'storage' => '1 GB sak-lagring',
|
||||
'seats' => '1 plass',
|
||||
'cap' => '30 verktøy/time',
|
||||
'sku' => 'pro',
|
||||
'name' => $tierNames['pro'],
|
||||
'price' => '€29',
|
||||
'period' => dbnToolsT('pricing_period_mo', $uiLang),
|
||||
'credits' => '500 ' . dbnToolsT('pricing_credits_mo', $uiLang),
|
||||
'storage' => '1 GB',
|
||||
'seats' => dbnToolsT('pricing_seat_1', $uiLang),
|
||||
'cap' => '30 ' . dbnToolsT('pricing_cap_suffix', $uiLang),
|
||||
'features' => [
|
||||
'Alt i Light',
|
||||
'Hybrid søk (BM25 + vektor) i din sak',
|
||||
'Prioritert kø ved opplasting',
|
||||
'Tidslinje-rapport på saken din',
|
||||
dbnToolsT('pricing_pro_f1', $uiLang),
|
||||
dbnToolsT('pricing_pro_f2', $uiLang),
|
||||
dbnToolsT('pricing_pro_f3', $uiLang),
|
||||
dbnToolsT('pricing_pro_f4', $uiLang),
|
||||
],
|
||||
'highlight' => true,
|
||||
'badge' => 'Mest populær',
|
||||
'badge' => dbnToolsT('pricing_badge_popular', $uiLang),
|
||||
],
|
||||
[
|
||||
'sku' => 'pro_plus',
|
||||
'name' => 'Pro+ Familie',
|
||||
'price' => '€79',
|
||||
'period' => '/ måned',
|
||||
'credits' => 'Ubegrenset',
|
||||
'storage' => '10 GB sak-lagring',
|
||||
'seats' => '3 plasser (familie)',
|
||||
'cap' => '50 verktøy/time per plass',
|
||||
'sku' => 'pro_plus',
|
||||
'name' => $tierNames['pro_plus'],
|
||||
'price' => '€79',
|
||||
'period' => dbnToolsT('pricing_period_mo', $uiLang),
|
||||
'credits' => dbnToolsT('pricing_unlimited', $uiLang),
|
||||
'storage' => '10 GB',
|
||||
'seats' => dbnToolsT('pricing_seats_family', $uiLang),
|
||||
'cap' => '50 ' . dbnToolsT('pricing_cap_per_seat', $uiLang),
|
||||
'features' => [
|
||||
'Alt i Pro',
|
||||
'Inviter 2 familiemedlemmer eller advokat',
|
||||
'Delt sak-arkiv med revisjonslogg',
|
||||
'Ubegrensede saksrapporter',
|
||||
dbnToolsT('pricing_proplus_f1', $uiLang),
|
||||
dbnToolsT('pricing_proplus_f2', $uiLang),
|
||||
dbnToolsT('pricing_proplus_f3', $uiLang),
|
||||
dbnToolsT('pricing_proplus_f4', $uiLang),
|
||||
],
|
||||
'highlight' => false,
|
||||
'badge' => 'For familier',
|
||||
'badge' => dbnToolsT('pricing_badge_family', $uiLang),
|
||||
],
|
||||
];
|
||||
|
||||
$topupNotes = [
|
||||
'topup_s' => dbnToolsT('pricing_topup_s_note', $uiLang),
|
||||
'topup_m' => dbnToolsT('pricing_topup_m_note', $uiLang),
|
||||
'topup_l' => dbnToolsT('pricing_topup_l_note', $uiLang),
|
||||
];
|
||||
$topups = [
|
||||
['sku' => 'topup_s', 'price' => '€5', 'credits' => 30, 'note' => 'Impulskjøp'],
|
||||
['sku' => 'topup_m', 'price' => '€15', 'credits' => 100, 'note' => 'Beste verdi'],
|
||||
['sku' => 'topup_l', 'price' => '€40', 'credits' => 300, 'note' => 'Tunge brukere'],
|
||||
['sku' => 'topup_s', 'price' => '€5', 'credits' => 30, 'note' => $topupNotes['topup_s']],
|
||||
['sku' => 'topup_m', 'price' => '€15', 'credits' => 100, 'note' => $topupNotes['topup_m']],
|
||||
['sku' => 'topup_l', 'price' => '€40', 'credits' => 300, 'note' => $topupNotes['topup_l']],
|
||||
];
|
||||
?>
|
||||
<!doctype html>
|
||||
@@ -100,8 +116,8 @@ $topups = [
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Priser — Do Better Norge verktøy</title>
|
||||
<meta name="description" content="Priser for tools.dobetternorge.no: gratis tier, abonnementer og kreditt-topp-opp. Bygg din egen sak med privat RAG.">
|
||||
<title><?= pt('pricing_title_meta', $uiLang) ?></title>
|
||||
<meta name="description" content="<?= pt('pricing_desc_meta', $uiLang) ?>">
|
||||
<link rel="canonical" href="https://tools.dobetternorge.no/pricing.php">
|
||||
<meta name="theme-color" content="#00205B">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
@@ -153,33 +169,42 @@ $topups = [
|
||||
.status-pill-info { display: inline-block; margin-bottom: 1.5rem; padding: 6px 12px; background: #fef3c7; color: #92400e; border-radius: 6px; font-size: 0.9rem; }
|
||||
.status-pill-success { background: #d1fae5; color: #065f46; }
|
||||
.status-pill-error { background: #fee2e2; color: #991b1b; }
|
||||
.lang-bar { text-align: right; margin-bottom: 1rem; font-size: 0.85rem; }
|
||||
.lang-bar a { margin-left: 0.5rem; color: #6b7280; text-decoration: none; padding: 2px 6px; border-radius: 4px; }
|
||||
.lang-bar a.is-active { background: #00205B; color: #fff; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main class="pricing-shell">
|
||||
<div class="lang-bar">
|
||||
<?php foreach (['no', 'en', 'uk', 'pl'] as $lc): ?>
|
||||
<a href="?lang=<?= $lc ?>" class="<?= $lc === $uiLang ? 'is-active' : '' ?>"><?= htmlspecialchars(dbnToolsLanguageLabel($lc)) ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<header class="pricing-hero">
|
||||
<p style="margin:0 0 0.5rem; text-transform:uppercase; letter-spacing:0.08em; color:#6b7280; font-size:0.85rem;">Do Better Norge — verktøy</p>
|
||||
<h1>Bygg din egen sak. Bruk hele verktøyboksen.</h1>
|
||||
<p>13 AI-verktøy for barnevernssaker. Last opp dine egne dokumenter, og la verktøyene jobbe på din private sak — ikke bare generisk lov.</p>
|
||||
<p style="margin:0 0 0.5rem; text-transform:uppercase; letter-spacing:0.08em; color:#6b7280; font-size:0.85rem;"><?= pt('pricing_eyebrow', $uiLang) ?></p>
|
||||
<h1><?= pt('pricing_hero_title', $uiLang) ?></h1>
|
||||
<p><?= pt('pricing_hero_sub', $uiLang) ?></p>
|
||||
</header>
|
||||
|
||||
<?php if ($status === 'success'): ?>
|
||||
<p class="status-pill-info status-pill-success">Takk! Din betaling er bekreftet. Det kan ta noen sekunder før kontoen oppdateres.</p>
|
||||
<p class="status-pill-info status-pill-success"><?= pt('pricing_status_success', $uiLang) ?></p>
|
||||
<?php elseif ($status === 'canceled'): ?>
|
||||
<p class="status-pill-info">Kassen ble avbrutt. Du kan prøve igjen når som helst.</p>
|
||||
<p class="status-pill-info"><?= pt('pricing_status_canceled', $uiLang) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($isAuthed && !$surveyDone): ?>
|
||||
<div class="survey-banner">
|
||||
<div class="copy">
|
||||
<h3>Tjen 25 ekstra kreditter</h3>
|
||||
<p>Svar på 5 korte spørsmål om hva som hjelper deg mest. Ingen salgspitch — bare research som hjelper oss å forbedre verktøyene.</p>
|
||||
<h3><?= pt('pricing_survey_title', $uiLang) ?></h3>
|
||||
<p><?= pt('pricing_survey_text', $uiLang) ?></p>
|
||||
</div>
|
||||
<a href="<?= htmlspecialchars($surveyUrl) ?>">Ta undersøkelsen</a>
|
||||
<a href="<?= htmlspecialchars($surveyUrl) ?>"><?= pt('pricing_survey_cta', $uiLang) ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="pricing-grid" aria-label="Abonnementer">
|
||||
<section class="pricing-grid" aria-label="<?= pt('pricing_faq_title', $uiLang) ?>">
|
||||
<?php foreach ($tiers as $tier): ?>
|
||||
<article class="pricing-card<?= !empty($tier['highlight']) ? ' is-highlight' : '' ?>">
|
||||
<?php if (!empty($tier['badge'])): ?>
|
||||
@@ -203,20 +228,20 @@ $topups = [
|
||||
</ul>
|
||||
<?php if ($tier['sku'] === 'free'): ?>
|
||||
<?php if (!$isAuthed): ?>
|
||||
<a class="pricing-cta primary" href="<?= htmlspecialchars($loginUrl) ?>"><?= htmlspecialchars($tier['cta'] ?? 'Logg inn') ?></a>
|
||||
<a class="pricing-cta primary" href="<?= htmlspecialchars($loginUrl) ?>"><?= htmlspecialchars($tier['cta'] ?? dbnToolsT('pricing_cta_login', $uiLang)) ?></a>
|
||||
<?php elseif ($currentTier === 'free'): ?>
|
||||
<span class="pricing-cta current">Din nåværende plan</span>
|
||||
<span class="pricing-cta current"><?= pt('pricing_cta_current', $uiLang) ?></span>
|
||||
<?php else: ?>
|
||||
<span class="pricing-cta secondary">Tilgjengelig</span>
|
||||
<span class="pricing-cta secondary"><?= pt('pricing_cta_available', $uiLang) ?></span>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if (!$isAuthed): ?>
|
||||
<a class="pricing-cta primary" href="<?= htmlspecialchars($loginUrl) ?>">Logg inn for å abonnere</a>
|
||||
<a class="pricing-cta primary" href="<?= htmlspecialchars($loginUrl) ?>"><?= pt('pricing_cta_subscribe', $uiLang) ?></a>
|
||||
<?php elseif ($currentTier === $tier['sku']): ?>
|
||||
<span class="pricing-cta current">Din nåværende plan</span>
|
||||
<span class="pricing-cta current"><?= pt('pricing_cta_current', $uiLang) ?></span>
|
||||
<?php else: ?>
|
||||
<button type="button" class="pricing-cta primary" data-sku="<?= htmlspecialchars($tier['sku']) ?>" data-checkout="subscription">
|
||||
Velg <?= htmlspecialchars($tier['name']) ?>
|
||||
<?= pt('pricing_cta_choose', $uiLang) ?> <?= htmlspecialchars($tier['name']) ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -224,63 +249,67 @@ $topups = [
|
||||
<?php endforeach; ?>
|
||||
</section>
|
||||
|
||||
<section class="pricing-topups" aria-label="Engangskjøp">
|
||||
<h2>Topp opp kreditter</h2>
|
||||
<p class="lead">Trenger du flere kreditter denne måneden? Kjøp en engangspakke — de utløper aldri.</p>
|
||||
<section class="pricing-topups" aria-label="<?= pt('pricing_topup_title', $uiLang) ?>">
|
||||
<h2><?= pt('pricing_topup_title', $uiLang) ?></h2>
|
||||
<p class="lead"><?= pt('pricing_topup_lead', $uiLang) ?></p>
|
||||
<div class="topup-grid">
|
||||
<?php foreach ($topups as $topup): ?>
|
||||
<div class="topup-card">
|
||||
<div class="price"><?= htmlspecialchars($topup['price']) ?></div>
|
||||
<div class="credits"><?= (int)$topup['credits'] ?> kreditter</div>
|
||||
<div class="credits"><?= (int)$topup['credits'] ?> <?= pt('pricing_credits_label', $uiLang) ?></div>
|
||||
<div class="note"><?= htmlspecialchars($topup['note']) ?></div>
|
||||
<?php if ($isAuthed): ?>
|
||||
<button type="button" class="pricing-cta primary" data-sku="<?= htmlspecialchars($topup['sku']) ?>" data-checkout="topup">Kjøp</button>
|
||||
<button type="button" class="pricing-cta primary" data-sku="<?= htmlspecialchars($topup['sku']) ?>" data-checkout="topup"><?= pt('pricing_topup_buy', $uiLang) ?></button>
|
||||
<?php else: ?>
|
||||
<a class="pricing-cta primary" href="<?= htmlspecialchars($loginUrl) ?>">Logg inn først</a>
|
||||
<a class="pricing-cta primary" href="<?= htmlspecialchars($loginUrl) ?>"><?= pt('pricing_login_first', $uiLang) ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="pricing-faq" aria-label="Ofte stilte spørsmål">
|
||||
<h2 style="font-family:'Crimson Pro', serif; margin-bottom:1rem;">Ofte stilte spørsmål</h2>
|
||||
<section class="pricing-faq" aria-label="<?= pt('pricing_faq_title', $uiLang) ?>">
|
||||
<h2 style="font-family:'Crimson Pro', serif; margin-bottom:1rem;"><?= pt('pricing_faq_title', $uiLang) ?></h2>
|
||||
<details>
|
||||
<summary>Hva er forskjellen mellom månedlige kreditter og bonuskreditter?</summary>
|
||||
<p>Månedlige kreditter (fra abonnement eller gratis tier) tilbakestilles første hver måned. Bonuskreditter (fra undersøkelsen eller topp-opp) utløper aldri og brukes etter de månedlige er oppbrukt.</p>
|
||||
<summary><?= pt('pricing_faq1_q', $uiLang) ?></summary>
|
||||
<p><?= pt('pricing_faq1_a', $uiLang) ?></p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Hva er Min Sak?</summary>
|
||||
<p>Min Sak er din private dokumentbank. Last opp PDF-er fra saken din, så blir de OCR-ert, analysert og lagret i din egen sikre korpus. Alle verktøyene kan deretter referere til dine egne dokumenter i stedet for bare generisk lov.</p>
|
||||
<summary><?= pt('pricing_faq2_q', $uiLang) ?></summary>
|
||||
<p><?= pt('pricing_faq2_a', $uiLang) ?></p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Hvor er dataene mine lagret?</summary>
|
||||
<p>Alt innenfor EU: servere i Falkenstein (Tyskland) og Helsinki (Finland), AI-tjenester i Vest-Europa og Norge Øst. Vi er hostet hos Hetzner og bruker Microsoft Azure for AI. Stripe behandler betalinger gjennom Irland.</p>
|
||||
<summary><?= pt('pricing_faq3_q', $uiLang) ?></summary>
|
||||
<p><?= pt('pricing_faq3_a', $uiLang) ?></p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Kan jeg dele en konto med advokaten min?</summary>
|
||||
<p>Ja — Pro+ Familie inkluderer 3 plasser. Du kan invitere advokat, samboer eller en annen familiemedlem. Alle ser de samme dokumentene, men hvem som gjorde hva blir logget.</p>
|
||||
<summary><?= pt('pricing_faq4_q', $uiLang) ?></summary>
|
||||
<p><?= pt('pricing_faq4_a', $uiLang) ?></p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Hva skjer hvis jeg sier opp?</summary>
|
||||
<p>Du faller tilbake til gratis-tier. Bonuskredittene dine beholdes. Dokumentene i Min Sak oppbevares i 90 dager før de slettes — så du har tid til å eksportere dem eller fornye.</p>
|
||||
<summary><?= pt('pricing_faq5_q', $uiLang) ?></summary>
|
||||
<p><?= pt('pricing_faq5_a', $uiLang) ?></p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Tilbyr dere refusjon?</summary>
|
||||
<p>Ja, full refusjon innen 7 dager hvis du ikke er fornøyd. Send oss en e-post.</p>
|
||||
<summary><?= pt('pricing_faq6_q', $uiLang) ?></summary>
|
||||
<p><?= pt('pricing_faq6_a', $uiLang) ?></p>
|
||||
</details>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
const connecting = <?= json_encode(dbnToolsT('pricing_connecting', $uiLang)) ?>;
|
||||
const errorRetry = <?= json_encode(dbnToolsT('pricing_error_retry', $uiLang)) ?>;
|
||||
const errorMsg = <?= json_encode(dbnToolsT('pricing_error_checkout', $uiLang)) ?>;
|
||||
|
||||
const buttons = document.querySelectorAll('button[data-checkout]');
|
||||
buttons.forEach(btn => {
|
||||
btn.addEventListener('click', async () => {
|
||||
const sku = btn.getAttribute('data-sku');
|
||||
btn.disabled = true;
|
||||
const original = btn.textContent;
|
||||
btn.textContent = 'Kobler til...';
|
||||
btn.textContent = connecting;
|
||||
try {
|
||||
const res = await fetch('/api/stripe-checkout.php', {
|
||||
method: 'POST',
|
||||
@@ -291,12 +320,12 @@ $topups = [
|
||||
if (data.ok && data.url) {
|
||||
window.location.href = data.url;
|
||||
} else {
|
||||
btn.textContent = 'Feil — prøv igjen';
|
||||
alert(data.error?.message || 'Kunne ikke starte kassen.');
|
||||
btn.textContent = errorRetry;
|
||||
alert(data.error?.message || errorMsg);
|
||||
}
|
||||
} catch (e) {
|
||||
btn.textContent = original;
|
||||
alert('Nettverksfeil: ' + e.message);
|
||||
alert(e.message);
|
||||
} finally {
|
||||
setTimeout(() => { btn.disabled = false; btn.textContent = original; }, 1500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user