diff --git a/CHANGELOG.md b/CHANGELOG.md index 33dd251e5561..f9750efb3298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,11 @@ ### Payment Method Messaging Element * [Added] `PaymentMethodMessagingElement` is now in public preview +## XX.XX.XX + +### Identity +* [Added] More live feedback during document capture. + ## 25.1.1 2025-11-24 ### Financial Connections diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/bg-BG.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/bg-BG.lproj/Localizable.strings index 56bc214953ba..bcdd70785ae3 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/bg-BG.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/bg-BG.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Зареждане"; -"Make sure all details are visible and focus" = "Уверете се, че всички данни са видими и на фокус."; "Make sure you're in a well lit space." = "Уверете се, че сте на добре осветено място."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/ca-ES.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/ca-ES.lproj/Localizable.strings index ff62159f3488..7eed332d0589 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/ca-ES.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/ca-ES.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "S'està carregant"; -"Make sure all details are visible and focus" = "Assegureu-vos que tots els detalls siguin visibles"; "Make sure you're in a well lit space." = "Assegureu-vos que esteu en un espai ben il·luminat."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/cs-CZ.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/cs-CZ.lproj/Localizable.strings index 302c1f261578..2f43319598a9 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/cs-CZ.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/cs-CZ.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Načítání"; -"Make sure all details are visible and focus" = "Ujistěte se, že jsou všechny detaily viditelné a zaostřené"; "Make sure you're in a well lit space." = "Ujistěte se, že jste v řádně osvětleném prostoru."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/da.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/da.lproj/Localizable.strings index 8b326a6c4cb0..80650183c288 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/da.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/da.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Indlæser"; -"Make sure all details are visible and focus" = "Kontrollér, at alle detaljer er synlige og i fokus"; "Make sure you're in a well lit space." = "Sørg for, at du er et sted, der er ordentligt oplyst."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/de.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/de.lproj/Localizable.strings index 9e3fc07c0f73..236e9c67414b 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/de.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/de.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Wird geladen"; -"Make sure all details are visible and focus" = "Vergewissern Sie sich, dass alle Details sichtbar und scharf sind"; "Make sure you're in a well lit space." = "Sorgen Sie für ausreichende Beleuchtung."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/el-GR.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/el-GR.lproj/Localizable.strings index c490ea3cd0c2..599b3126e53a 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/el-GR.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/el-GR.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Φόρτωση"; -"Make sure all details are visible and focus" = "Βεβαιωθείτε ότι όλες οι λεπτομέρειες είναι ορατές και εστιασμένες"; "Make sure you're in a well lit space." = "Βεβαιωθείτε ότι βρίσκεστε σε έναν καλά φωτισμένο χώρο."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/en-GB.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/en-GB.lproj/Localizable.strings index c9aea13f12a6..af5e15dd3a05 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/en-GB.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/en-GB.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Loading"; -"Make sure all details are visible and focus" = "Make sure all details are visible and focus"; "Make sure you're in a well lit space." = "Make sure you're in a well lit space."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/en.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/en.lproj/Localizable.strings index c9585bfb5b98..c273a309fc70 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/en.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/en.lproj/Localizable.strings @@ -64,6 +64,12 @@ /* Instructional text for scanning back of a identity card */ "Flip your identity card over to the other side" = "Flip your identity card over to the other side"; +/* Instructional text when the user is expected to scan the back of their ID but the camera is seeing the front or a passport instead */ +"Back of ID not detected" = "Back of ID not detected"; + +/* Instructional text when the user is expected to scan the front of their ID but the camera is seeing the back instead */ +"Front of ID not detected" = "Front of ID not detected"; + /* Accessibility label when front driver's license, passport, or government issued photo id photo has successfully uploaded */ "Front %@ photo successfully uploaded" = "Front %@ photo successfully uploaded"; @@ -123,7 +129,13 @@ "Loading" = "Loading"; /* Instructional text when the document is too blurry */ -"Make sure all details are visible and focus" = "Make sure all details are visible and focus"; +"Image is blurry. Hold your phone steady and try again." = "Image is blurry. Hold your phone steady and try again."; + +/* Instructional text when the scanned document appears not to be a valid ID document */ +"Invalid document" = "Invalid document"; + +/* Instructional text when the document is not centered in the frame */ +"Center ID in view" = "Center ID in view"; /* Body for selfie warmup page */ "Make sure you're in a well lit space." = "Make sure you're in a well lit space."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/es-419.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/es-419.lproj/Localizable.strings index ac47ad745103..37e3ca97a6fa 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/es-419.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/es-419.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Cargando"; -"Make sure all details are visible and focus" = "Asegúrate de que todos tus datos se vean y estén enfocados"; "Make sure you're in a well lit space." = "Asegúrate de que estás en un lugar bien iluminado."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/es.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/es.lproj/Localizable.strings index 1b48c9c7b20e..70a7949cd3b1 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/es.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/es.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Cargando"; -"Make sure all details are visible and focus" = "Asegúrate de que todos tus datos se vean y estén enfocados."; "Make sure you're in a well lit space." = "Asegúrate de que estás en un lugar bien iluminado."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/et-EE.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/et-EE.lproj/Localizable.strings index bc0c7ce06a46..54333f455850 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/et-EE.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/et-EE.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Laadimine"; -"Make sure all details are visible and focus" = "Veenduge, et kõik üksikasjad oleksid nähtavad ja teravad"; "Make sure you're in a well lit space." = "Veenduge, et olete hästi valgustatud kohas."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/fi.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/fi.lproj/Localizable.strings index bb886d7cb8ba..684bbc22cd06 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/fi.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/fi.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Ladataan"; -"Make sure all details are visible and focus" = "Varmista, että kaikki tiedot ovat näkyvissä ja tarkennettuja"; "Make sure you're in a well lit space." = "Varmista, että olet hyvin valaistussa tilassa."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/fil.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/fil.lproj/Localizable.strings index 2169ba063c7a..623350ca0f35 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/fil.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/fil.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Niloload"; -"Make sure all details are visible and focus" = "Siguraduhing nakikita at nakapokus ang lahat ng mga detalye"; "Make sure you're in a well lit space." = "Siguraduhing ikaw ay nasa maliwanag na lugar."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/fr-CA.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/fr-CA.lproj/Localizable.strings index ebd82a631f1c..2ae6ac7969f3 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/fr-CA.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/fr-CA.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Chargement en cours"; -"Make sure all details are visible and focus" = "Assurez-vous que tous les détails sont nets et visibles"; "Make sure you're in a well lit space." = "Installez-vous dans un endroit bien éclairé."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/fr.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/fr.lproj/Localizable.strings index 25751fa3dbb1..4b2ddd4b13df 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/fr.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/fr.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Chargement en cours"; -"Make sure all details are visible and focus" = "Assurez-vous que tous les détails sont nets et visibles"; "Make sure you're in a well lit space." = "Installez-vous dans un endroit bien éclairé."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/hr.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/hr.lproj/Localizable.strings index e575eb9e9f06..092d8a634835 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/hr.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/hr.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Učitavanje"; -"Make sure all details are visible and focus" = "Provjerite jesu li svi podaci vidljivi i fokusirajte dokument"; "Make sure you're in a well lit space." = "Provjerite jeste li u dobro osvijetljenom prostoru."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/hu.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/hu.lproj/Localizable.strings index 28d62515f0ce..ab54000f3cd5 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/hu.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/hu.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Betöltés folyamatban"; -"Make sure all details are visible and focus" = "Győződjön meg arról, hogy minden részlet látható és fókuszban van."; "Make sure you're in a well lit space." = "Válasszon jól megvilágított helyet."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/id.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/id.lproj/Localizable.strings index eaa9f3cc7f54..004ceb68f967 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/id.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/id.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Memuat"; -"Make sure all details are visible and focus" = "Pastikan seluruh detail dapat dilihat dan dalam fokus."; "Make sure you're in a well lit space." = "Pastikan Anda berada di ruang yang cukup terang."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/it.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/it.lproj/Localizable.strings index 3f26d3406f4b..0d51f45e6a16 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/it.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/it.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Caricamento in corso"; -"Make sure all details are visible and focus" = "Assicurati che tutti i dettagli siano visibili e a fuoco"; "Make sure you're in a well lit space." = "Assicurati che l'illuminazione sia adeguata."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/ja.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/ja.lproj/Localizable.strings index de5f92e2561b..4464977a71df 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/ja.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/ja.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "読み込み中"; -"Make sure all details are visible and focus" = "すべての詳細が表示され、焦点が合っていることを確認してください"; "Make sure you're in a well lit space." = "明るい場所にいることを確認してください。"; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/ko.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/ko.lproj/Localizable.strings index 7118e608b27a..47dd0d2bcbb4 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/ko.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/ko.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "로드 중"; -"Make sure all details are visible and focus" = "모든 세부사항이 보이고 초점이 맞춰져 있는지 확인하십시오"; "Make sure you're in a well lit space." = "공간의 조명이 밝은지 확인하십시오."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/lt-LT.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/lt-LT.lproj/Localizable.strings index b27302d1d146..301a06b7bada 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/lt-LT.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/lt-LT.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Įkeliama"; -"Make sure all details are visible and focus" = "Įsitikinkite, kad visos detalės yra matomos ir sufokusuotos"; "Make sure you're in a well lit space." = "Įsitikinkite, kad esate gerai apšviestoje erdvėje."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/lv-LV.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/lv-LV.lproj/Localizable.strings index bec88f837649..8fce45e3cad8 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/lv-LV.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/lv-LV.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Ielādē"; -"Make sure all details are visible and focus" = "Pārliecinieties, vai visas detaļas ir redzamas un fokusētas."; "Make sure you're in a well lit space." = "Pārliecinieties, ka atrodaties labi apgaismotā vietā."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/ms-MY.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/ms-MY.lproj/Localizable.strings index f581107cb355..c42b486395ea 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/ms-MY.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/ms-MY.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Sedang dimuatkan"; -"Make sure all details are visible and focus" = "Pastikan semua butiran dapat dilihat dan berada dalam fokus"; "Make sure you're in a well lit space." = "Pastikan anda berada di ruang yang cukup terang."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/mt.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/mt.lproj/Localizable.strings index 15d11eaf3abd..dc538dafdb34 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/mt.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/mt.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Tielgħa"; -"Make sure all details are visible and focus" = "Ara li d-dettalji kollha jidhru sewwa u huma ffukati"; "Make sure you're in a well lit space." = "Ara li tinsab f'post imdawwal sew."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/nb.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/nb.lproj/Localizable.strings index d7972843d7af..66924d0e7b16 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/nb.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/nb.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Laster inn"; -"Make sure all details are visible and focus" = "Sørg for at alle detaljer er synlige og i fokus."; "Make sure you're in a well lit space." = "Sørg for at du befinner deg i et godt opplyst rom."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/nl.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/nl.lproj/Localizable.strings index eba1e02ed8f8..c21d557eed30 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/nl.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/nl.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Bezig met laden"; -"Make sure all details are visible and focus" = "Zorg dat alle details goed zichtbaar en in focus zijn"; "Make sure you're in a well lit space." = "Zorg dat er voldoende belichting is."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/pl-PL.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/pl-PL.lproj/Localizable.strings index dbb1a148fd0c..f4d1ba892719 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/pl-PL.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/pl-PL.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Wczytywanie"; -"Make sure all details are visible and focus" = "Upewnij się, że wszystkie szczegóły są widoczne i ostre"; "Make sure you're in a well lit space." = "Upewnij się, że znajdujesz się w dobrze oświetlonym miejscu."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/pt-BR.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/pt-BR.lproj/Localizable.strings index 18861146165b..b9e6dc0ef480 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/pt-BR.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/pt-BR.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Carregando"; -"Make sure all details are visible and focus" = "Confira se todos os detalhes estão visíveis e em foco."; "Make sure you're in a well lit space." = "Escolha um espaço bem iluminado."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/pt-PT.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/pt-PT.lproj/Localizable.strings index 3a98b71624b5..71ec06be93c0 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/pt-PT.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/pt-PT.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "A carregar"; -"Make sure all details are visible and focus" = "Certifique-se de que todas as informações estão visíveis e focadas"; "Make sure you're in a well lit space." = "Certifique-se de que se encontra num espaço bem iluminado."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/ro-RO.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/ro-RO.lproj/Localizable.strings index e325d068db60..09c618665033 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/ro-RO.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/ro-RO.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Se încarcă"; -"Make sure all details are visible and focus" = "Asigurați-vă că toate detaliile sunt vizibile și focalizați"; "Make sure you're in a well lit space." = "Asigurați-vă că vă aflați într-un spațiu bine luminat."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/ru.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/ru.lproj/Localizable.strings index 2e64c1562271..3f0f7e0ad101 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/ru.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/ru.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Идет загрузка"; -"Make sure all details are visible and focus" = "Проследите, чтобы все детали были видны и в фокусе"; "Make sure you're in a well lit space." = "Позаботьтесь о хорошем освещении."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/sk-SK.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/sk-SK.lproj/Localizable.strings index ae249c35ffbb..0fdec53f7896 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/sk-SK.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/sk-SK.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Nahrávanie"; -"Make sure all details are visible and focus" = "Uistite sa, že sú všetky podrobnosti viditeľné a správne zaostrené"; "Make sure you're in a well lit space." = "Uistite sa, že ste v dobre osvetlenom priestore."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/sl-SI.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/sl-SI.lproj/Localizable.strings index 65c3f2350e77..c03167323889 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/sl-SI.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/sl-SI.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Nalaganje"; -"Make sure all details are visible and focus" = "Prepričajte se, da so vse podrobnosti vidne in izostrene"; "Make sure you're in a well lit space." = "Poskrbite, da ste v dobro osvetljenem prostoru."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/sv.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/sv.lproj/Localizable.strings index ac2227bf2247..196ee8c7b487 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/sv.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/sv.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Laddar"; -"Make sure all details are visible and focus" = "Se till att alla uppgifter är synliga och i fokus"; "Make sure you're in a well lit space." = "Se till att du befinner dig på en plats med bra belysning."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/th.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/th.lproj/Localizable.strings index 69f39df28379..5894c5bff3fc 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/th.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/th.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "กำลังโหลด"; -"Make sure all details are visible and focus" = "ตรวจสอบว่ารายละเอียดทั้งหมดสามารถมองเห็นได้และอยู่ในระยะโฟกัส"; "Make sure you're in a well lit space." = "ตรวจสอบว่าคุณอยู่ในสภาพแวดล้อมที่มีแสงสว่างเพียงพอ"; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/tr.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/tr.lproj/Localizable.strings index c71b1379fa96..cf38ee9082a9 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/tr.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/tr.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Yükleniyor"; -"Make sure all details are visible and focus" = "Tüm detayların görünür ve odak dahilinde olduğundan emin olun"; "Make sure you're in a well lit space." = "İyi ışık alan bir alanda olduğunuzdan emin olun."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/vi.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/vi.lproj/Localizable.strings index 9491b5f46a41..bbfca45a0534 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/vi.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/vi.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "Đang tải"; -"Make sure all details are visible and focus" = "Đảm bảo tất cả các thông tin nhìn rõ và được lấy nét"; "Make sure you're in a well lit space." = "Hãy đảm bảo bạn đang ở trong không gian đủ ánh sáng."; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/zh-HK.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/zh-HK.lproj/Localizable.strings index f1bf3d133259..f35573d6bba5 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/zh-HK.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/zh-HK.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "正在載入"; -"Make sure all details are visible and focus" = "確保所有細節是否清晰可見且對焦"; "Make sure you're in a well lit space." = "確保光線充足。"; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hans.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hans.lproj/Localizable.strings index a682e6bb35c5..3455c3d11f61 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hans.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hans.lproj/Localizable.strings @@ -74,7 +74,6 @@ "Loading" = "正在加载"; -"Make sure all details are visible and focus" = "确保所有细节清晰可见且对焦"; "Make sure you're in a well lit space." = "确保光线充足。"; diff --git a/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hant.lproj/Localizable.strings b/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hant.lproj/Localizable.strings index e14eed5b2e16..afb0a965d745 100644 --- a/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hant.lproj/Localizable.strings +++ b/StripeIdentity/StripeIdentity/Resources/Localizations/zh-Hant.lproj/Localizable.strings @@ -48,7 +48,6 @@ "Loading" = "正在載入"; -"Make sure all details are visible and focus" = "確保所有細節是否清晰可見且對焦"; "Make sure you're in a well lit space." = "確保光線充足。"; diff --git a/StripeIdentity/StripeIdentity/Source/Helpers/String+Localized.swift b/StripeIdentity/StripeIdentity/Source/Helpers/String+Localized.swift index 606eb50f1599..b07a43464046 100644 --- a/StripeIdentity/StripeIdentity/Source/Helpers/String+Localized.swift +++ b/StripeIdentity/StripeIdentity/Source/Helpers/String+Localized.swift @@ -75,6 +75,20 @@ extension String.Localized { ) } + static var back_of_id_not_detected: String { + return STPLocalizedString( + "Back of ID not detected", + "Instructional text when the user is expected to scan the back of their ID but the camera is seeing the front or a passport instead" + ) + } + + static var front_of_id_not_detected: String { + return STPLocalizedString( + "Front of ID not detected", + "Instructional text when the user is expected to scan the front of their ID but the camera is seeing the back instead" + ) + } + static var position_in_center_identity_card: String { return STPLocalizedString( "Position your identity document in the center of the frame", @@ -167,11 +181,25 @@ extension String.Localized { static var reduce_blur: String { return STPLocalizedString( - "Make sure all details are visible and focus", + "Image is blurry. Hold your phone steady and try again.", "Instructional text when the document is too blurry" ) } + static var invalid_document: String { + return STPLocalizedString( + "Invalid document", + "Instructional text when the scanned document appears not to be a valid ID document" + ) + } + + static var center_id_in_view: String { + return STPLocalizedString( + "Center ID in view", + "Instructional text when the document is not centered in the frame" + ) + } + static var point_camera_to_document: String { return STPLocalizedString( "No document detected", diff --git a/StripeIdentity/StripeIdentity/Source/NativeComponents/Detectors/IDDetector/IDDetectorOutput.swift b/StripeIdentity/StripeIdentity/Source/NativeComponents/Detectors/IDDetector/IDDetectorOutput.swift index 602579445e07..3500143af841 100644 --- a/StripeIdentity/StripeIdentity/Source/NativeComponents/Detectors/IDDetector/IDDetectorOutput.swift +++ b/StripeIdentity/StripeIdentity/Source/NativeComponents/Detectors/IDDetector/IDDetectorOutput.swift @@ -237,4 +237,14 @@ extension IDDetectorOutput: OptionalVisionBasedDetectorOutput { return .ok } } + + /// Returns true when the detected document is roughly centered in the frame. + /// - Parameter threshold: Allowed distance from frame center (in normalized coordinates). + /// If either axis deviates more than `threshold` from 0.5, + /// the document is considered off-center. + func isCentered(threshold: CGFloat = 0.08) -> Bool { + let cx = documentBounds.midX + let cy = documentBounds.midY + return abs(cx - 0.5) <= threshold && abs(cy - 0.5) <= threshold + } } diff --git a/StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController+Strings.swift b/StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController+Strings.swift index 40493f230525..34513eb8ccf1 100644 --- a/StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController+Strings.swift +++ b/StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController+Strings.swift @@ -64,14 +64,33 @@ extension DocumentCaptureViewController { switch documentScannerOutput { case .none: return scanningTextWithNoInput(availableIDTypes: availableIDTypes, for: side) - case .some(.legacy(let idDetectorOutput, _, _, _, _)): + case .some(.legacy(let idDetectorOutput, _, let motionblur, _, _)): let foundClassification = idDetectorOutput.classification let matchesClassification = foundClassification.matchesDocument(side: side) let zoomLevel = idDetectorOutput.computeZoomLevel() + + if foundClassification == .invalid { + return String.Localized.invalid_document + } + + // If document appears off-center, ask user to center it (only when the side matches) + if matchesClassification && !idDetectorOutput.isCentered() { + return String.Localized.center_id_in_view + } switch (side, matchesClassification, zoomLevel) { case (.front, false, _), (.back, false, _): - return scanningTextWithNoInput(availableIDTypes: availableIDTypes, for: side) + switch (side, foundClassification) { + case (.front, .idCardBack): + return String.Localized.front_of_id_not_detected + case (.back, .idCardFront), (.back, .passport): + return String.Localized.back_of_id_not_detected + default: + return scanningTextWithNoInput(availableIDTypes: availableIDTypes, for: side) + } case (_, true, .ok): + if motionblur.hasMotionBlur { + return String.Localized.reduce_blur + } return String.Localized.scanning case (_, true, .tooClose): return String.Localized.move_farther