Skip to content

Commit

Permalink
[UPI] Show error instead of disabled button (#1729)
Browse files Browse the repository at this point in the history
## Summary
- Showing an error item when the submit button was tapped without having
an app selected

### TODOs

- [x] Localization

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: goergisn <4838877+goergisn@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 5, 2024
1 parent a427e27 commit a0122c4
Show file tree
Hide file tree
Showing 50 changed files with 194 additions and 85 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ excluded:
- DerivedData
- Carthage
- TempProject
- Scripts

line_length:
ignores_function_declarations: true
Expand Down
2 changes: 2 additions & 0 deletions Adyen/Assets/Generated/LocalizationKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ public struct LocalizationKey {
public static let UPICollectDropdownLabel = LocalizationKey(key: "adyen.UPI.collectDropdownLabel")
/// Enter UPI ID / VPA
public static let UPICollectFieldLabel = LocalizationKey(key: "adyen.UPI.collectFieldLabel")
/// Select a payment method to continue
public static let UPIErrorNoAppSelected = LocalizationKey(key: "adyen.UPI.error.noAppSelected")
/// Cash App Pay
public static let cashAppPayTitle = LocalizationKey(key: "adyen.cashAppPay.title")
/// Cashtag
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "أدخل معرف UPI";
"adyen.UPI.collectFieldLabel" = "أدخل معرف واجهة المدفوعات الموحدة (UPI) / عنوان الدفع الافتراضي (VPA)";
"adyen.UPI.error.noAppSelected" = "للمتابعة؛ حدد وسيلة للدفع";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "لم يتم تثبيت أي إصدار من TWINT على هذا الجهاز أو الإصدار قديم. يُرجى تحديث أو تثبيت تطبيق TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/cs-CZ.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Zadejte UPI ID";
"adyen.UPI.collectFieldLabel" = "Zadejte UPI ID / VPA";
"adyen.UPI.error.noAppSelected" = "Pro pokračování je potřeba vybrat platební metodu";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "V tomto zařízení není nainstalována žádná verze TWINT nebo je zastaralá. Aktualizujte nebo nainstalujte aplikaci TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/da-DK.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Indtast UPI-id";
"adyen.UPI.collectFieldLabel" = "Indtast UPI-id/VPA";
"adyen.UPI.error.noAppSelected" = "Vælg en betalingsmåde for at fortsætte";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Ingen eller en forældet version af TWINT er installeret på denne enhed. Opdater eller installer TWINT-appen.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/de-DE.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "UPI-ID eingeben";
"adyen.UPI.collectFieldLabel" = "UPI-ID/VPA eingeben";
"adyen.UPI.error.noAppSelected" = "Wählen Sie eine Zahlungsmethode aus, um fortzufahren";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Auf diesem Gerät ist keine oder eine veraltete Version von TWINT installiert. Bitte aktualisieren oder installieren Sie die TWINT-App.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/el-GR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Εισαγωγή αναγνωριστικού UPI";
"adyen.UPI.collectFieldLabel" = "Εισαγωγή αναγνωριστικού UPI / VPA";
"adyen.UPI.error.noAppSelected" = "Επιλέξτε μια μέθοδο πληρωμής για να συνεχίσετε";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Σε αυτή τη συσκευή το TWINT είτε δεν είναι εγκατεστημένο είτε είναι σε παλιά έκδοση. Ενημερώστε ή εγκαταστήστε την εφαρμογή TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/en-US.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Enter UPI ID";
"adyen.UPI.collectFieldLabel" = "Enter UPI ID / VPA";
"adyen.UPI.error.noAppSelected" = "Select a payment method to continue";
"adyen.cashAppPay.title" = "Cash App Pay";
"adyen.cashAppPay.cashtag" = "Cashtag";
"adyen.twint.noAppsInstalled.message" = "No or an outdated version of TWINT is installed on this device. Please update or install the TWINT app.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/es-ES.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Introduzca el ID de la UPI";
"adyen.UPI.collectFieldLabel" = "Introduzca el ID de la UPI/VPA";
"adyen.UPI.error.noAppSelected" = "Selecciona un método de pago para continuar";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Este dispositivo no tiene TWINT instalado o cuenta con una versión obsoleta. Actualice o instale la aplicación de TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/fi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Syötä UPI-tunnus";
"adyen.UPI.collectFieldLabel" = "Syötä UPI-tunnus/VPA";
"adyen.UPI.error.noAppSelected" = "Jatka valitsemalla maksutapa";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Laitteeseen ei ole asennettu TWINT-sovellusta tai laitteessa on sen vanhentunut versio. Päivitä tai asenna TWINT-sovellus.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/fr-FR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Entrez l'identifiant UPI";
"adyen.UPI.collectFieldLabel" = "Entrez l'identifiant UPI / VPA";
"adyen.UPI.error.noAppSelected" = "Sélectionnez un mode de paiement pour continuer";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Aucune version de TWINT n'est installée sur cet appareil, ou celle-ci est obsolète. Veuillez mettre à jour ou installer l'application TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/hr-HR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Unesite UPI ID";
"adyen.UPI.collectFieldLabel" = "Unesite UPI ID/VPA";
"adyen.UPI.error.noAppSelected" = "Za nastavak odaberite način plaćanja";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Na ovom uređaju nije instalirana niti jedna ili je instalirana zastarjela verzija aplikacije TWINT. Ažurirajte ili instalirajte aplikaciju TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/hu-HU.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "UPI-azonosító megadása";
"adyen.UPI.collectFieldLabel" = "UPI-azonosító/VPA megadása";
"adyen.UPI.error.noAppSelected" = "A folytatáshoz válasszon fizetési módot";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Az eszközről hiányzik a TWINT, vagy egy elavult verziója van telepítve. Frissítse vagy telepítse a TWINT alkalmazást.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/it-IT.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Immetti l'ID UPI";
"adyen.UPI.collectFieldLabel" = "Immetti l'ID UPI / VPA";
"adyen.UPI.error.noAppSelected" = "Seleziona un metodo di pagamento per continuare";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Su questo dispositivo non è installata alcuna versione di TWINT, oppure la versione installata è obsoleta. Aggiorna o installa l'app TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/ja-JP.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "UPI IDを入力してください";
"adyen.UPI.collectFieldLabel" = "UPI ID/VPAを入力してください";
"adyen.UPI.error.noAppSelected" = "支払い方法を選択して続行する";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "このデバイスにはTWINTがインストールされていないか、古いバージョンがインストールされています。 TWINTアプリを更新またはインストールするようお願い申し上げます。";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "UPI ID 입력";
"adyen.UPI.collectFieldLabel" = "UPI ID / VPA 입력";
"adyen.UPI.error.noAppSelected" = "계속 진행하려면 결제 수단을 선택하세요";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "이 기기에 TWINT가 설치되어 있지 않거나 오래된 버전이 설치되어 있습니다. TWINT 앱을 업데이트하거나 설치해 주세요.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/nb-NO.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Angi UPI-ID";
"adyen.UPI.collectFieldLabel" = "Skriv inn UPI-ID/VPA";
"adyen.UPI.error.noAppSelected" = "Velg en betalingsmetode for å fortsette";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Du har enten ingen eller en utdatert versjon av TWINT på denne enheten. Du må enten oppdatere eller installere TWINT-appen.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/nl-NL.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "UPI-ID invoeren";
"adyen.UPI.collectFieldLabel" = "UPI-ID/VPA invoeren";
"adyen.UPI.error.noAppSelected" = "Selecteer een betalingsmethode om door te gaan";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Er is geen of een verouderde versie van TWINT geïnstalleerd op dit apparaat. De TWINT-app moet worden bijgewerkt of geïnstalleerd.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/pl-PL.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Wprowadź identyfikator UPI";
"adyen.UPI.collectFieldLabel" = "Wprowadź identyfikator UPI / VPA";
"adyen.UPI.error.noAppSelected" = "Wybierz metodę płatności, aby kontynuować";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Na tym urządzeniu nie ma żadnej wersji TWINT lub jest ona nieaktualna. Zaktualizuj lub zainstaluj aplikację TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Informe o ID da UPI";
"adyen.UPI.collectFieldLabel" = "Digite o ID UPI/VPA";
"adyen.UPI.error.noAppSelected" = "Selecione um método de pagamento para continuar";
"adyen.cashAppPay.title" = "";
"adyen.cashAppPay.cashtag" = "";
"adyen.twint.noAppsInstalled.message" = "Este aparelho não tem nenhuma versão do TWINT instalada, ou a versão está desatualizada. Atualize ou instale o app TWINT.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/pt-PT.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Introduza o ID da app UPI";
"adyen.UPI.collectFieldLabel" = "Introduza o ID da aplicação UPI/VPA";
"adyen.UPI.error.noAppSelected" = "Selecione um método de pagamento para continuar";
"adyen.twint.noAppsInstalled.message" = "Nenhuma versão ou uma versão desatualizada do TWINT está instalada neste dispositivo. Atualize ou instale a app TWINT.";
"adyen.threeds2.DA.registration.title" = "Finalização da compra rápida e segura!";
"adyen.threeds2.DA.registration.description" = "Pode finalizar a compra mais rapidamente da próxima vez neste dispositivo usando a sua biometria.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/ro-RO.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Introduceți ID-ul UPI";
"adyen.UPI.collectFieldLabel" = "Completați identificatorul UPI/VPA";
"adyen.UPI.error.noAppSelected" = "Selectați o metodă de plată pentru a continua";
"adyen.twint.noAppsInstalled.message" = "Pe acest dispozitiv nu este instalată nicio versiune sau este o versiune depășită a TWINT. Actualizați sau instalați aplicația TWINT.";
"adyen.threeds2.DA.registration.title" = "Proces de validare sigur și rapid!";
"adyen.threeds2.DA.registration.description" = "Data viitoare, puteți efectua mai repede validarea de pe acest dispozitiv, utilizând datele biometrice.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/ru-RU.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Введите идентификатор UPI";
"adyen.UPI.collectFieldLabel" = "Введите VPA или идентификатор UPI";
"adyen.UPI.error.noAppSelected" = "Для продолжения выберите способ оплаты";
"adyen.twint.noAppsInstalled.message" = "На этом устройстве либо установлена устаревшая версия TWINT, либо это приложение не установлено вообще. Обновите или установите TWINT.";
"adyen.threeds2.DA.registration.title" = "Безопасная и быстрая оплата!";
"adyen.threeds2.DA.registration.description" = "В следующий раз вы сможете быстрее оформить заказ на этом устройстве, используя свои биометрические данные.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/sk-SK.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Zadajte UPI ID";
"adyen.UPI.collectFieldLabel" = "Zadajte UPI ID / VPA";
"adyen.UPI.error.noAppSelected" = "Pokračujte výberom spôsobu platby";
"adyen.twint.noAppsInstalled.message" = "V tomto zariadení nie je nainštalovaná aplikácia TWINT, alebo je verzia aplikácie TWINT zastaraná. Prosím, aktualizujte si alebo si nainštalujte aplikáciu TWINT.";
"adyen.threeds2.DA.registration.title" = "Bezpečná a rýchla platba!";
"adyen.threeds2.DA.registration.description" = "Nabudúce môžete v tomto zariadení zaplatiť rýchlejšie pomocou biometrických údajov.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/sl-SI.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Vnesite UPI ID";
"adyen.UPI.collectFieldLabel" = "Vnesite UPI ID / VPA";
"adyen.UPI.error.noAppSelected" = "Za nadaljevanje izberite način plačila";
"adyen.twint.noAppsInstalled.message" = "V tej napravi ni nameščena različica aplikacije TWINT ali pa je zastarela. Posodobite ali namestite aplikacijo TWINT.";
"adyen.threeds2.DA.registration.title" = "Varno in hitro dokončanje nakupov!";
"adyen.threeds2.DA.registration.description" = "Naslednjič lahko v tej napravi hitreje dokončate nakup z uporabo biometričnih podatkov.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/sv-SE.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "Ange UPI-ID";
"adyen.UPI.collectFieldLabel" = "Ange UPI-ID/VPA";
"adyen.UPI.error.noAppSelected" = "Välj en betalningsmetod för att fortsätta";
"adyen.twint.noAppsInstalled.message" = "Ingen, eller en utgången, version av TWINT finns installerad på den här enheten. Uppdatera eller installera TWINT-appen.";
"adyen.threeds2.DA.registration.title" = "Säker och snabb betalning!";
"adyen.threeds2.DA.registration.description" = "Du kan betala snabbare nästa gång på den här enheten med hjälp av biometri.";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/zh-CN.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "输入 UPI ID";
"adyen.UPI.collectFieldLabel" = "输入 UPI ID/VPA";
"adyen.UPI.error.noAppSelected" = "选择支付方式继续";
"adyen.twint.noAppsInstalled.message" = "此设备上未安装 TWINT 或安装的 TWINT 版本已过期。请更新或安装 TWINT 应用。";
"adyen.threeds2.DA.registration.title" = "安全快捷结账!";
"adyen.threeds2.DA.registration.description" = "下次您可以使用生物识别技术在此设备上更快地结账。";
Expand Down
1 change: 1 addition & 0 deletions Adyen/Assets/zh-TW.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"adyen.UPI.secondTabTitle" = "Other UPI options";
"adyen.UPI.collectDropdownLabel" = "輸入 UPI ID";
"adyen.UPI.collectFieldLabel" = "輸入 UPI ID / VPA";
"adyen.UPI.error.noAppSelected" = "選取付款方式以繼續";
"adyen.twint.noAppsInstalled.message" = "這個裝置並未安裝 TWINT 的應用程式,或是可能安裝到了舊版的 TWINT 應用程式。 請更新或安裝 TWINT 的應用程式。";
"adyen.threeds2.DA.registration.title" = "安全快捷的結帳!";
"adyen.threeds2.DA.registration.description" = "下次您可以使用生物特徵辨識功能,在此裝置上更快結帳。";
Expand Down
2 changes: 1 addition & 1 deletion Adyen/UI/Form/Items/Error/FormErrorItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public final class FormErrorItem: FormItem, Hidable {
/// - Parameter message: The message.
/// - Parameter iconName: The icon name.
/// - Parameter style: a `FormErrorItemStyle` UI style.
public init(message: String? = nil, iconName: String, style: FormErrorItemStyle = FormErrorItemStyle()) {
public init(message: String? = nil, iconName: String = "error", style: FormErrorItemStyle = FormErrorItemStyle()) {
self.iconName = iconName
self.style = style
self.message = message
Expand Down
4 changes: 2 additions & 2 deletions Adyen/UI/Form/Items/Error/FormErrorItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal final class FormErrorItemView: FormItemView<FormErrorItem> {
bind(item.$message, to: self, at: \.accessibilityLabel)
isHidden = item.isHidden.wrappedValue
addSubview(containerView)
containerView.adyen.anchor(inside: layoutMarginsGuide, with: UIEdgeInsets(top: 16, left: 16, bottom: -16, right: -16))
containerView.adyen.anchor(inside: layoutMarginsGuide, with: UIEdgeInsets(top: 8, left: 0, bottom: -8, right: 0))
containerView.backgroundColor = item.style.backgroundColor
containerView.adyen.round(using: item.style.cornerRounding)
backgroundColor = .clear
Expand Down Expand Up @@ -49,7 +49,7 @@ internal final class FormErrorItemView: FormItemView<FormErrorItem> {

// MARK: - Message

private lazy var messageLabel: UILabel = {
internal lazy var messageLabel: UILabel = {
let messageLabel = UILabel(style: item.style.message)
messageLabel.numberOfLines = 0
messageLabel.isAccessibilityElement = false
Expand Down
3 changes: 2 additions & 1 deletion AdyenActions/Components/Await/AwaitComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public final class AwaitComponent: ActionComponent, Cancellable {
if success {
self.handle(AwaitAction(
paymentData: action.paymentData,
paymentMethodType: action.paymentMethodType)
paymentMethodType: action.paymentMethodType
)
)

self.delegate?.didOpenExternalApplication(component: self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ public final class GiftCardComponent: PresentableComponent,
// MARK: Items

internal lazy var errorItem: FormErrorItem = {
let item = FormErrorItem(iconName: "error",
style: style.errorStyle)
let item = FormErrorItem(style: style.errorStyle)
item.identifier = ViewIdentifierBuilder.build(scopeInstance: self, postfix: "errorItem")
return item
}()
Expand Down
Loading

0 comments on commit a0122c4

Please sign in to comment.