diff --git a/.github/workflows/generate_dependency_graph.yml b/.github/workflows/generate_dependency_graph.yml index a58817f3e8..724419dc54 100644 --- a/.github/workflows/generate_dependency_graph.yml +++ b/.github/workflows/generate_dependency_graph.yml @@ -9,9 +9,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + + # Setup Java 17 + # https://github.com/marketplace/actions/setup-java-jdk + - name: Set up JDK + uses: actions/setup-java@v4 with: - ref: ${{ github.head_ref }} - fetch-depth: 0 + distribution: 'zulu' + java-version: 17 + cache: 'gradle' - name: Setup Graphviz uses: ts-graphviz/setup-graphviz@v1 @@ -30,4 +36,4 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.head_ref }} + branch: ${{ github.ref }} diff --git a/3ds2/build.gradle b/3ds2/build.gradle index fd202313f6..a034923583 100644 --- a/3ds2/build.gradle +++ b/3ds2/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.adyen3ds2' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/3ds2/src/main/java/com/adyen/checkout/adyen3ds2/Adyen3DS2Configuration.kt b/3ds2/src/main/java/com/adyen/checkout/adyen3ds2/Adyen3DS2Configuration.kt index ab4fcfbf18..2b34309019 100644 --- a/3ds2/src/main/java/com/adyen/checkout/adyen3ds2/Adyen3DS2Configuration.kt +++ b/3ds2/src/main/java/com/adyen/checkout/adyen3ds2/Adyen3DS2Configuration.kt @@ -141,7 +141,7 @@ fun CheckoutConfiguration.adyen3DS2( return this } -fun CheckoutConfiguration.getAdyen3DS2Configuration(): Adyen3DS2Configuration? { +internal fun CheckoutConfiguration.getAdyen3DS2Configuration(): Adyen3DS2Configuration? { return getActionConfiguration(Adyen3DS2Configuration::class.java) } diff --git a/README.md b/README.md index 6a55482726..875e809922 100644 --- a/README.md +++ b/README.md @@ -31,23 +31,23 @@ Import the corresponding module in your `build.gradle` file. For Drop-in: ```groovy -implementation "com.adyen.checkout:drop-in-compose:5.3.0" +implementation "com.adyen.checkout:drop-in-compose:5.3.1" ``` For the Credit Card component: ```groovy -implementation "com.adyen.checkout:card:5.3.0" -implementation "com.adyen.checkout:components-compose:5.3.0" +implementation "com.adyen.checkout:card:5.3.1" +implementation "com.adyen.checkout:components-compose:5.3.1" ``` ### Without Jetpack Compose For Drop-in: ```groovy -implementation "com.adyen.checkout:drop-in:5.3.0" +implementation "com.adyen.checkout:drop-in:5.3.1" ``` For the Credit Card component: ```groovy -implementation "com.adyen.checkout:card:5.3.0" +implementation "com.adyen.checkout:card:5.3.1" ``` The library is available on [Maven Central][mavenRepo]. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index eb45949724..3574118366 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -8,71 +8,18 @@ [//]: # (## Deprecated) [//]: # ( - Configurations public constructor are deprecated, please use each Configuration's builder to make a Configuration object) -## New -- A new way to create a configuration using DSL to be more declarative and concise: -```Kotlin -CheckoutConfiguration( - environment = environment, - clientKey = clientKey, - shopperLocale = shopperLocale, - amount = amount, -) { - dropIn { - setEnableRemovingStoredPaymentMethods(true) - } - - card { - setHolderNameRequired(true) - setShopperReference("...") - } - - adyen3DS2 { - setThreeDSRequestorAppURL("...") - } -} -``` - -- For the Card Component, you can use the new [Address Lookup functionality](docs/ADDRESS_LOOKUP.md). -- For voucher actions: when the `url` or `downloadUrl` is not included, the shopper has the option to select **Save as image** and save the voucher to the device's `Downloads` folder. -- You can now set your own `AdyenLogger` instance with `AdyenLogger.setLogger`. This gives the ability to intercept logs and handle them in your own way. -- [Instructions](example-app/README.md) to use the testing app in the repository. You can follow `How to migrate` section [here](https://github.com/Adyen/adyen-android/pull/1505). -- Payment methods: - - Multibanco. Payment method type: **multibanco**. - - Pay Easy. Payment method type: **econtext_atm**. - - Convenience Stores Japan. Payment method type: **econtext_stores** - - Online Banking Japan. Payment method type: **econtext_online**. - - Seven-Eleven: Payment method type: **econtext_seven_eleven** - ## Fixed -- When building `minifyEnabled` without the `kotlin-parcelize` plugin in your project, the build should no longer crash. -- When handling actions, you no longer get the `IllegalArgumentException: Unsupported delegate type` error that causes a crash. +- For Drop-in and Components, when `?android:attr/textColor` is not defined in your own theme, the Card Component no longer crashes. +- The `onAdditionalDetails` event is now triggered only once. Previously, the event was triggered multiple times in some edge cases. +- The build output no longer contains warnings about multiple substitutions specified in non-positional format in string resources. +- For the Card Component, we fixed localization issues that occurred when using the Address Lookup functionality. +- Overriding some of the XML styles without specifying a parent style no longer causes a build error. -## Deprecated -- When creating a configuration, the `Builder` constructors with a `Context` is deprecated. You can now omit the `context` parameter. -- `PermissionException`. Handle permissions through `ActionComponentCallback`, `SessionComponentCallback`, or `ComponentCallback` callbacks instead. -- The styles for vouchers have been changed: - - | Previous (v5.2.0 or earlier) | Now (v5.3.0) | - |---------------------------------------------|-----------------------------------------------| - | `AdyenCheckout.Voucher.Description.Bacs` | `AdyenCheckout.Voucher.Simple.Description` | - | `AdyenCheckout.Voucher.Description.Boleto` | `AdyenCheckout.Voucher.Full.Description` | - | `AdyenCheckout.Voucher.ExpirationDateLabel` | `AdyenCheckout.Voucher.InformationFieldLabel` | - | `AdyenCheckout.Voucher.ExpirationDate` | `AdyenCheckout.Voucher.InformationFieldValue` | - | `AdyenCheckout.Voucher.ButtonCopyCode` | `AdyenCheckout.Voucher.Button.CopyCode` | - | `AdyenCheckout.Voucher.ButtonDownloadPdf` | `AdyenCheckout.Voucher.Button.DownloadPdf` | -- Logger.LogLevel has been deprecated. - - | Previous (v5.2.0 or earlier) | Now (v5.3.0) | - |------------------------------------------|-------------------------------------------------| - | `Logger.LogLevel` | `AdyenLogLevel` | - | `AdyenLogger.setLogLevel(logLevel: Int)` | `AdyenLogger.setLogLevel(level: AdyenLogLevel)` | +## Removed +- You can no longer use functions like `CheckoutConfiguration.getCardConfiguration()` or `CheckoutConfiguration.getDropInConfiguration()` to get configurations from the `CheckoutConfiguration` object. When starting Drop-in or Components, pass the full `CheckoutConfiguration` object. ## Changed -- When creating a configuration, the `shopperLocale` parameter is now optional. - - Sessions flow: when you don't set it, the shopper locale is set to the value included in the `/sessions` request. - - Advanced flow: when you don't set it, the shopper local is set to the primary user locale on the device. -- For Drop-in, all actions now start in expanded mode. -- For the Google Pay Component, you no longer need to manually import the `3ds2` module to handle transactions that require Native 3D Secure 2 challenge. -- If you use `DropInServiceResult.Error` without specifying an error message, the default has changed from `Error sending payment. Please try again.` to `An unknown error occurred`. -- For the Sessions flow: - - When starting Drop-in (with `DropIn.startPayment`) or creating a Component (with `YourComponent.PROVIDER.get`), the `configuration` parameter is now optional. - - When using `CheckoutSessionProvider.createSession` to create a `CheckoutSession`, you can pass only `environment` and `clientKey` instead of the whole configuration. - - Removing stored payment methods is now handled internally. You no longer need to override the `onRemoveStoredPaymentMethod` function. +- Dependency versions: + | Name | Version | + |--------------------------------------------------------------------------------------------------------|-------------------------------| + | [Android Gradle plugin](https://developer.android.com/build/releases/gradle-plugin) | **8.3.1** | diff --git a/SECURITY.md b/SECURITY.md index e843ff246f..6bff304ad7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,4 @@ # Disclosing security issues -We welcome reports of possible vulnerabilities or issues as part of our [responsible disclosure policy](https://www.adyen.com/policies-and-disclaimer/responsible-disclosure). For more information check out this page on [how to disclose a security issue](https://help.adyen.com/en_US/knowledge/security/product-security/how-do-i-disclose-a-security-issue). +We welcome reports of possible vulnerabilities or issues as part of our [responsible disclosure policy](https://www.adyen.com/policies-and-disclaimer/responsible-disclosure). For more information go to +[this page](https://www.adyen.com/policies-and-disclaimer/responsible-disclosure). diff --git a/ach/build.gradle b/ach/build.gradle index 68059afd78..953cb6ff44 100644 --- a/ach/build.gradle +++ b/ach/build.gradle @@ -12,13 +12,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.ach' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" diff --git a/ach/src/main/java/com/adyen/checkout/ach/ACHDirectDebitConfiguration.kt b/ach/src/main/java/com/adyen/checkout/ach/ACHDirectDebitConfiguration.kt index 5562fb7af1..fd709c4714 100644 --- a/ach/src/main/java/com/adyen/checkout/ach/ACHDirectDebitConfiguration.kt +++ b/ach/src/main/java/com/adyen/checkout/ach/ACHDirectDebitConfiguration.kt @@ -167,7 +167,7 @@ fun CheckoutConfiguration.achDirectDebit( return this } -fun CheckoutConfiguration.getACHDirectDebitConfiguration(): ACHDirectDebitConfiguration? { +internal fun CheckoutConfiguration.getACHDirectDebitConfiguration(): ACHDirectDebitConfiguration? { return getConfiguration(PaymentMethodTypes.ACH) } diff --git a/action-core/build.gradle b/action-core/build.gradle index a5368082be..b2c6de067c 100644 --- a/action-core/build.gradle +++ b/action-core/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.action.core' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/action/build.gradle b/action/build.gradle index 6f5e7bfc93..51d9376945 100644 --- a/action/build.gradle +++ b/action/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.action' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/await/build.gradle b/await/build.gradle index 93a826031d..6354a30f92 100644 --- a/await/build.gradle +++ b/await/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.await' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/await/src/main/java/com/adyen/checkout/await/AwaitConfiguration.kt b/await/src/main/java/com/adyen/checkout/await/AwaitConfiguration.kt index 6848d98ecb..a955936e0d 100644 --- a/await/src/main/java/com/adyen/checkout/await/AwaitConfiguration.kt +++ b/await/src/main/java/com/adyen/checkout/await/AwaitConfiguration.kt @@ -8,6 +8,7 @@ package com.adyen.checkout.await import android.content.Context +import androidx.annotation.VisibleForTesting import com.adyen.checkout.components.core.Amount import com.adyen.checkout.components.core.AnalyticsConfiguration import com.adyen.checkout.components.core.CheckoutConfiguration @@ -105,7 +106,8 @@ fun CheckoutConfiguration.await( return this } -fun CheckoutConfiguration.getAwaitConfiguration(): AwaitConfiguration? { +@VisibleForTesting +internal fun CheckoutConfiguration.getAwaitConfiguration(): AwaitConfiguration? { return getActionConfiguration(AwaitConfiguration::class.java) } diff --git a/bacs/build.gradle b/bacs/build.gradle index d50e338122..60fe8a0c86 100644 --- a/bacs/build.gradle +++ b/bacs/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.bacs' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/bacs/src/main/java/com/adyen/checkout/bacs/BacsDirectDebitConfiguration.kt b/bacs/src/main/java/com/adyen/checkout/bacs/BacsDirectDebitConfiguration.kt index a4a1d40697..dd45b63b65 100644 --- a/bacs/src/main/java/com/adyen/checkout/bacs/BacsDirectDebitConfiguration.kt +++ b/bacs/src/main/java/com/adyen/checkout/bacs/BacsDirectDebitConfiguration.kt @@ -131,7 +131,7 @@ fun CheckoutConfiguration.bacsDirectDebit( return this } -fun CheckoutConfiguration.getBacsDirectDebitConfiguration(): BacsDirectDebitConfiguration? { +internal fun CheckoutConfiguration.getBacsDirectDebitConfiguration(): BacsDirectDebitConfiguration? { return getConfiguration(PaymentMethodTypes.BACS) } diff --git a/bcmc/build.gradle b/bcmc/build.gradle index 75ae403ba8..907610efe0 100644 --- a/bcmc/build.gradle +++ b/bcmc/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.bcmc' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/bcmc/src/main/java/com/adyen/checkout/bcmc/BcmcConfiguration.kt b/bcmc/src/main/java/com/adyen/checkout/bcmc/BcmcConfiguration.kt index 42236dfa79..c6766178ce 100644 --- a/bcmc/src/main/java/com/adyen/checkout/bcmc/BcmcConfiguration.kt +++ b/bcmc/src/main/java/com/adyen/checkout/bcmc/BcmcConfiguration.kt @@ -187,7 +187,7 @@ fun CheckoutConfiguration.bcmc( return this } -fun CheckoutConfiguration.getBcmcConfiguration(): BcmcConfiguration? { +internal fun CheckoutConfiguration.getBcmcConfiguration(): BcmcConfiguration? { return getConfiguration(PaymentMethodTypes.BCMC) } diff --git a/blik/build.gradle b/blik/build.gradle index 96636feda0..27e5dee456 100644 --- a/blik/build.gradle +++ b/blik/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.blik' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/blik/src/main/java/com/adyen/checkout/blik/BlikConfiguration.kt b/blik/src/main/java/com/adyen/checkout/blik/BlikConfiguration.kt index 6ee7c9578e..37c6aa849d 100644 --- a/blik/src/main/java/com/adyen/checkout/blik/BlikConfiguration.kt +++ b/blik/src/main/java/com/adyen/checkout/blik/BlikConfiguration.kt @@ -130,7 +130,7 @@ fun CheckoutConfiguration.blik( return this } -fun CheckoutConfiguration.getBlikConfiguration(): BlikConfiguration? { +internal fun CheckoutConfiguration.getBlikConfiguration(): BlikConfiguration? { return getConfiguration(PaymentMethodTypes.BLIK) } diff --git a/boleto/build.gradle b/boleto/build.gradle index 26297d34c5..db3eb10a96 100644 --- a/boleto/build.gradle +++ b/boleto/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.boleto' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/boleto/src/main/java/com/adyen/checkout/boleto/BoletoConfiguration.kt b/boleto/src/main/java/com/adyen/checkout/boleto/BoletoConfiguration.kt index b586a9c61a..1c4271be0d 100644 --- a/boleto/src/main/java/com/adyen/checkout/boleto/BoletoConfiguration.kt +++ b/boleto/src/main/java/com/adyen/checkout/boleto/BoletoConfiguration.kt @@ -145,7 +145,7 @@ fun CheckoutConfiguration.boleto( return this } -fun CheckoutConfiguration.getBoletoConfiguration(): BoletoConfiguration? { +internal fun CheckoutConfiguration.getBoletoConfiguration(): BoletoConfiguration? { return BoletoComponent.PAYMENT_METHOD_TYPES.firstNotNullOfOrNull { key -> getConfiguration(key) } diff --git a/card/build.gradle b/card/build.gradle index d1b10a6949..ae7ecbcb5d 100644 --- a/card/build.gradle +++ b/card/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.card' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/card/src/main/java/com/adyen/checkout/card/CardConfiguration.kt b/card/src/main/java/com/adyen/checkout/card/CardConfiguration.kt index 69e6de8a7b..038d52305f 100644 --- a/card/src/main/java/com/adyen/checkout/card/CardConfiguration.kt +++ b/card/src/main/java/com/adyen/checkout/card/CardConfiguration.kt @@ -330,7 +330,7 @@ fun CheckoutConfiguration.card( return this } -fun CheckoutConfiguration.getCardConfiguration(): CardConfiguration? { +internal fun CheckoutConfiguration.getCardConfiguration(): CardConfiguration? { return getConfiguration(PaymentMethodTypes.SCHEME) } diff --git a/card/src/main/java/com/adyen/checkout/card/internal/ui/view/CardView.kt b/card/src/main/java/com/adyen/checkout/card/internal/ui/view/CardView.kt index 27c1ee85fc..6ab1e427c9 100644 --- a/card/src/main/java/com/adyen/checkout/card/internal/ui/view/CardView.kt +++ b/card/src/main/java/com/adyen/checkout/card/internal/ui/view/CardView.kt @@ -302,7 +302,7 @@ class CardView @JvmOverloads constructor( ) setDualBrandedCardImages(detectedCardTypes, cardOutputData.cardNumberState.validation) - // TODO: 29/01/2021 get this logic from OutputData + // TODO 29/01/2021 get this logic from OutputData val isAmex = detectedCardTypes.any { it.cardBrand == CardBrand(cardType = CardType.AMERICAN_EXPRESS) } binding.editTextCardNumber.setAmexCardFormat(isAmex) diff --git a/card/src/main/res/values-ar/strings.xml b/card/src/main/res/values-ar/strings.xml index 2e4c2f3497..f4b760ab51 100644 --- a/card/src/main/res/values-ar/strings.xml +++ b/card/src/main/res/values-ar/strings.xml @@ -32,7 +32,7 @@ عدد الأقساط %s أشهر - %s × %s + %1$s × %2$s الدفع مرة واحدة الدفع الدوري diff --git a/card/src/main/res/values-cs-rCZ/strings.xml b/card/src/main/res/values-cs-rCZ/strings.xml index 6cfb3dc18a..72c48c5363 100644 --- a/card/src/main/res/values-cs-rCZ/strings.xml +++ b/card/src/main/res/values-cs-rCZ/strings.xml @@ -32,7 +32,7 @@ Počet splátek %s měsíců - %s× %s + %1$s× %2$s Jednorázová platba Opakující se platba diff --git a/card/src/main/res/values-da-rDK/strings.xml b/card/src/main/res/values-da-rDK/strings.xml index a4e6fc42bd..462f9100fc 100644 --- a/card/src/main/res/values-da-rDK/strings.xml +++ b/card/src/main/res/values-da-rDK/strings.xml @@ -32,7 +32,7 @@ Antal rater %s måneder - %sx %s + %1$sx %2$s Engangsbetaling Løbende betaling diff --git a/card/src/main/res/values-de-rDE/strings.xml b/card/src/main/res/values-de-rDE/strings.xml index ac0f7e6754..3eda689b3e 100644 --- a/card/src/main/res/values-de-rDE/strings.xml +++ b/card/src/main/res/values-de-rDE/strings.xml @@ -32,7 +32,7 @@ Anzahl der Raten %s Monate - %sx %s + %1$sx %2$s Einmalige Zahlung Ratenzahlung diff --git a/card/src/main/res/values-el-rGR/strings.xml b/card/src/main/res/values-el-rGR/strings.xml index 99982e9f97..12c0538ef2 100644 --- a/card/src/main/res/values-el-rGR/strings.xml +++ b/card/src/main/res/values-el-rGR/strings.xml @@ -32,7 +32,7 @@ Αριθμός δόσεων %s μήνες - %sx %s + %1$sx %2$s Εφάπαξ πληρωμή Ανακυκλούμενη πληρωμή diff --git a/card/src/main/res/values-es-rES/strings.xml b/card/src/main/res/values-es-rES/strings.xml index 290dbaaaae..550d113c13 100644 --- a/card/src/main/res/values-es-rES/strings.xml +++ b/card/src/main/res/values-es-rES/strings.xml @@ -32,7 +32,7 @@ Número de plazos %s meses - %sx %s + %1$sx %2$s Pago único Pago rotativo diff --git a/card/src/main/res/values-fi-rFI/strings.xml b/card/src/main/res/values-fi-rFI/strings.xml index eccc53f258..577f5c5f32 100644 --- a/card/src/main/res/values-fi-rFI/strings.xml +++ b/card/src/main/res/values-fi-rFI/strings.xml @@ -32,7 +32,7 @@ Asennusten määrä %s kuukautta - %s x%s + %1$s x%2$s Kertamaksu Toistuva maksu diff --git a/card/src/main/res/values-fr-rFR/strings.xml b/card/src/main/res/values-fr-rFR/strings.xml index 3a909f9afd..8539aa6ad8 100644 --- a/card/src/main/res/values-fr-rFR/strings.xml +++ b/card/src/main/res/values-fr-rFR/strings.xml @@ -32,7 +32,7 @@ Nombre de versements %s mois - %sx %s + %1$sx %2$s Paiement unique Paiement en plusieurs fois diff --git a/card/src/main/res/values-hr-rHR/strings.xml b/card/src/main/res/values-hr-rHR/strings.xml index 06578c52a3..63fd707ffd 100644 --- a/card/src/main/res/values-hr-rHR/strings.xml +++ b/card/src/main/res/values-hr-rHR/strings.xml @@ -32,7 +32,7 @@ Broj rata Mjeseci: %s - %s x %s + %1$s x %2$s Jednokratno plaćanje Obnovljivo plaćanje diff --git a/card/src/main/res/values-hu-rHU/strings.xml b/card/src/main/res/values-hu-rHU/strings.xml index 278a73c72b..6238f73b0e 100644 --- a/card/src/main/res/values-hu-rHU/strings.xml +++ b/card/src/main/res/values-hu-rHU/strings.xml @@ -32,7 +32,7 @@ Részletek száma %s hónap - %s x %s + %1$s x %2$s Egyösszegű fizetés Többösszegű fizetés diff --git a/card/src/main/res/values-it-rIT/strings.xml b/card/src/main/res/values-it-rIT/strings.xml index 02922571c2..c279af9b2a 100644 --- a/card/src/main/res/values-it-rIT/strings.xml +++ b/card/src/main/res/values-it-rIT/strings.xml @@ -32,7 +32,7 @@ Numero di rate %s mesi - %s x%s + %2$s x%1$s Pagamento una tantum Pagamento ricorrente diff --git a/card/src/main/res/values-ja-rJP/strings.xml b/card/src/main/res/values-ja-rJP/strings.xml index bc993528b8..70fe6453f4 100644 --- a/card/src/main/res/values-ja-rJP/strings.xml +++ b/card/src/main/res/values-ja-rJP/strings.xml @@ -32,7 +32,7 @@ 分割回数 %sか月 - %sx %s + %1$sx %2$s 一括払い リボ払い diff --git a/card/src/main/res/values-ko-rKR/strings.xml b/card/src/main/res/values-ko-rKR/strings.xml index bd87e5cb0a..70dbe64a66 100644 --- a/card/src/main/res/values-ko-rKR/strings.xml +++ b/card/src/main/res/values-ko-rKR/strings.xml @@ -32,7 +32,7 @@ 할부 개월 수 %s개월 - %sx %s + %1$sx %2$s 일시불 결제 리볼빙 결제 diff --git a/card/src/main/res/values-nb-rNO/strings.xml b/card/src/main/res/values-nb-rNO/strings.xml index 98f43a4f72..397df6ad0f 100644 --- a/card/src/main/res/values-nb-rNO/strings.xml +++ b/card/src/main/res/values-nb-rNO/strings.xml @@ -32,7 +32,7 @@ Antall avdrag %s måneder - %sx %s + %1$sx %2$s Engangsbetaling Gjentakende betaling diff --git a/card/src/main/res/values-nl-rNL/strings.xml b/card/src/main/res/values-nl-rNL/strings.xml index 042cbd8e3c..80fb95731b 100644 --- a/card/src/main/res/values-nl-rNL/strings.xml +++ b/card/src/main/res/values-nl-rNL/strings.xml @@ -32,7 +32,7 @@ Aantal termijnen %s maanden - %sx %s + %1$sx %2$s Eenmalige betaling Terugkerende betaling diff --git a/card/src/main/res/values-pl-rPL/strings.xml b/card/src/main/res/values-pl-rPL/strings.xml index b9083d4ef2..0724167c2d 100644 --- a/card/src/main/res/values-pl-rPL/strings.xml +++ b/card/src/main/res/values-pl-rPL/strings.xml @@ -32,7 +32,7 @@ Liczba rat %s miesięcy - %sx %s + %1$sx %2$s Płatność jednorazowa Płatność odnawialna diff --git a/card/src/main/res/values-pt-rBR/strings.xml b/card/src/main/res/values-pt-rBR/strings.xml index 4b58ce9c90..fd39955ea6 100644 --- a/card/src/main/res/values-pt-rBR/strings.xml +++ b/card/src/main/res/values-pt-rBR/strings.xml @@ -32,7 +32,7 @@ Opções de Parcelamento %s meses - %sx %s + %1$sx %2$s Pagamento à vista Pagamento rotativo diff --git a/card/src/main/res/values-pt-rPT/strings.xml b/card/src/main/res/values-pt-rPT/strings.xml index ef6e04208e..a3c53da611 100644 --- a/card/src/main/res/values-pt-rPT/strings.xml +++ b/card/src/main/res/values-pt-rPT/strings.xml @@ -32,7 +32,7 @@ Número de prestações %s meses - %sx %s + %1$sx %2$s Pagamento único Pagamento rotativo diff --git a/card/src/main/res/values-ro-rRO/strings.xml b/card/src/main/res/values-ro-rRO/strings.xml index 17817225aa..568dd8ea78 100644 --- a/card/src/main/res/values-ro-rRO/strings.xml +++ b/card/src/main/res/values-ro-rRO/strings.xml @@ -32,7 +32,7 @@ Număr de rate %s luni - %sx %s + %1$sx %2$s Plată unică Plată recurentă diff --git a/card/src/main/res/values-ru-rRU/strings.xml b/card/src/main/res/values-ru-rRU/strings.xml index a63e095fdd..5ca1a2f70b 100644 --- a/card/src/main/res/values-ru-rRU/strings.xml +++ b/card/src/main/res/values-ru-rRU/strings.xml @@ -32,7 +32,7 @@ Количество платежей %s мес. - %s× %s + %1$s× %2$s Одноразовый платеж Повторяющаяся оплата diff --git a/card/src/main/res/values-sk-rSK/strings.xml b/card/src/main/res/values-sk-rSK/strings.xml index cf3eee1987..d76660487e 100644 --- a/card/src/main/res/values-sk-rSK/strings.xml +++ b/card/src/main/res/values-sk-rSK/strings.xml @@ -32,7 +32,7 @@ Počet splátok %s mesiace/-ov - %s x %s + %1$s x %2$s Jednorazová platba Revolvingová platba diff --git a/card/src/main/res/values-sl-rSI/strings.xml b/card/src/main/res/values-sl-rSI/strings.xml index 7d6713fb48..7d08cfcc3b 100644 --- a/card/src/main/res/values-sl-rSI/strings.xml +++ b/card/src/main/res/values-sl-rSI/strings.xml @@ -32,7 +32,7 @@ Število obrokov Št. mesecev: %s - %s × %s + %1$s × %2$s Enkratno plačilo Revolving plačilo diff --git a/card/src/main/res/values-sv-rSE/strings.xml b/card/src/main/res/values-sv-rSE/strings.xml index 9f0ab5fead..b9fb7c99ca 100644 --- a/card/src/main/res/values-sv-rSE/strings.xml +++ b/card/src/main/res/values-sv-rSE/strings.xml @@ -32,7 +32,7 @@ Antal delbetalningar %s månader - %s x %s + %1$s x %2$s Engångsbetalning Uppdelad betalning diff --git a/card/src/main/res/values-zh-rCN/strings.xml b/card/src/main/res/values-zh-rCN/strings.xml index 556a84c387..23605f2b8e 100644 --- a/card/src/main/res/values-zh-rCN/strings.xml +++ b/card/src/main/res/values-zh-rCN/strings.xml @@ -32,7 +32,7 @@ 分期付款期数 %s 个月 - %sx %s + %1$sx %2$s 全款支付 循环支付 diff --git a/card/src/main/res/values-zh-rTW/strings.xml b/card/src/main/res/values-zh-rTW/strings.xml index f216da2218..6842e37889 100644 --- a/card/src/main/res/values-zh-rTW/strings.xml +++ b/card/src/main/res/values-zh-rTW/strings.xml @@ -32,7 +32,7 @@ 分期付款的期數 %s 個月 - %sx %s + %1$sx %2$s 一次性付款 延期付款 diff --git a/card/src/main/res/values/strings.xml b/card/src/main/res/values/strings.xml index 29efdc76a4..6bac9728ed 100644 --- a/card/src/main/res/values/strings.xml +++ b/card/src/main/res/values/strings.xml @@ -32,7 +32,7 @@ Number of installments %s months - %sx %s + %1$sx %2$s One time payment Revolving payment diff --git a/card/src/main/res/values/styles.xml b/card/src/main/res/values/styles.xml index 47c7083969..2cfeb04f71 100644 --- a/card/src/main/res/values/styles.xml +++ b/card/src/main/res/values/styles.xml @@ -83,16 +83,19 @@ 18sp + + @@ -102,8 +105,7 @@ match_parent @dimen/standard_margin @dimen/input_height - Search Address - @string/checkout_address_lookup_hint - ?android:attr/textColor + @string/checkout_address_lookup_hint + ?attr/colorOnSurface diff --git a/cashapppay/build.gradle b/cashapppay/build.gradle index e48ef3fab4..b368bda3b7 100644 --- a/cashapppay/build.gradle +++ b/cashapppay/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.cashapppay' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/cashapppay/src/main/java/com/adyen/checkout/cashapppay/CashAppPayConfiguration.kt b/cashapppay/src/main/java/com/adyen/checkout/cashapppay/CashAppPayConfiguration.kt index 30ce6e4fb0..1081adc6c0 100644 --- a/cashapppay/src/main/java/com/adyen/checkout/cashapppay/CashAppPayConfiguration.kt +++ b/cashapppay/src/main/java/com/adyen/checkout/cashapppay/CashAppPayConfiguration.kt @@ -199,7 +199,7 @@ fun CheckoutConfiguration.cashAppPay( return this } -fun CheckoutConfiguration.getCashAppPayConfiguration(): CashAppPayConfiguration? { +internal fun CheckoutConfiguration.getCashAppPayConfiguration(): CashAppPayConfiguration? { return getConfiguration(PaymentMethodTypes.CASH_APP_PAY) } diff --git a/checkout-core/build.gradle b/checkout-core/build.gradle index 4aa77ddbce..02ca7d14d9 100644 --- a/checkout-core/build.gradle +++ b/checkout-core/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.core' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/components-compose/build.gradle b/components-compose/build.gradle index fe541590e6..4d6f3892b6 100644 --- a/components-compose/build.gradle +++ b/components-compose/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.components.compose' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/components-core/build.gradle b/components-core/build.gradle index 64822b57d0..dbbc3facd4 100644 --- a/components-core/build.gradle +++ b/components-core/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.components.core' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/action/VoucherAction.kt b/components-core/src/main/java/com/adyen/checkout/components/core/action/VoucherAction.kt index 36134e38e9..fac826e819 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/action/VoucherAction.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/action/VoucherAction.kt @@ -33,7 +33,7 @@ data class VoucherAction( var alternativeReference: String? = null, var merchantName: String? = null, var merchantReference: String? = null, - // TODO: remove url when it's fixed from backend side + // TODO remove url when it's fixed from backend side var url: String? = null, var downloadUrl: String? = null, var instructionsUrl: String? = null, diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/StatusRepository.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/StatusRepository.kt index ba23f8de61..4850b00e36 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/StatusRepository.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/StatusRepository.kt @@ -9,25 +9,34 @@ package com.adyen.checkout.components.core.internal.data.api import androidx.annotation.RestrictTo +import androidx.annotation.VisibleForTesting import com.adyen.checkout.components.core.internal.data.model.StatusRequest import com.adyen.checkout.components.core.internal.data.model.StatusResponse import com.adyen.checkout.components.core.internal.util.StatusResponseUtils +import com.adyen.checkout.components.core.internal.util.bufferedChannel import com.adyen.checkout.core.AdyenLogLevel import com.adyen.checkout.core.internal.util.adyenLog import com.adyen.checkout.core.internal.util.runSuspendCatching import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.cancel import kotlinx.coroutines.currentCoroutineContext import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.debounce import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge +import kotlinx.coroutines.flow.onEach +import kotlinx.coroutines.flow.receiveAsFlow +import kotlinx.coroutines.flow.transform import kotlinx.coroutines.isActive import kotlinx.coroutines.withContext -import java.util.concurrent.TimeUnit +import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.Duration.Companion.seconds +import kotlin.time.TimeMark +import kotlin.time.TimeSource @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) interface StatusRepository { @@ -41,19 +50,36 @@ interface StatusRepository { class DefaultStatusRepository( private val statusService: StatusService, private val clientKey: String, + private val timeSource: TimeSource = TimeSource.Monotonic, private val coroutineDispatcher: CoroutineDispatcher = Dispatchers.IO, ) : StatusRepository { private var delay: Long = 0 - private val refreshFlow: MutableSharedFlow = MutableSharedFlow(extraBufferCapacity = 1) + private val refreshFlow = bufferedChannel() + @OptIn(FlowPreview::class) override fun poll(paymentData: String, maxPollingDuration: Long): Flow> { - val startTime = System.currentTimeMillis() + val startTime = timeSource.markNow() + + updateDelay(startTime, maxPollingDuration) val pollingFlow = flow { while (currentCoroutineContext().isActive) { - val result = fetchStatus(paymentData) + emit(paymentData) + delay(delay) + } + } + + return merge( + pollingFlow, + refreshFlow.receiveAsFlow(), + ) + .debounce(DEBOUNCE_TIME) + .map { + fetchStatus(it) + } + .transform { result -> emit(result) if (result.isSuccess && StatusResponseUtils.isFinalResult(result.getOrThrow())) { @@ -61,18 +87,14 @@ class DefaultStatusRepository( } if (!updateDelay(startTime, maxPollingDuration)) { - emit(Result.failure(IllegalStateException("Max polling time has been exceeded."))) + adyenLog(AdyenLogLevel.DEBUG) { "Max polling time exceeded" } + emit(Result.failure(IllegalStateException("Max polling time exceeded."))) currentCoroutineContext().cancel() } - - delay(delay) } - } - - return merge( - pollingFlow, - refreshFlow.map { fetchStatus(it) }, - ) + .onEach { + adyenLog(AdyenLogLevel.DEBUG) { "Emitting status: ${it.getOrNull()?.resultCode}" } + } } private suspend fun fetchStatus(paymentData: String) = withContext(coroutineDispatcher) { @@ -84,8 +106,8 @@ class DefaultStatusRepository( /** * @return Returns if the delay time was updated. If not, that means the max polling time has been exceeded. */ - private fun updateDelay(startTime: Long, maxPollingDuration: Long): Boolean { - val elapsedTime = System.currentTimeMillis() - startTime + private fun updateDelay(startTime: TimeMark, maxPollingDuration: Long): Boolean { + val elapsedTime = startTime.elapsedNow().inWholeMilliseconds return when { elapsedTime <= POLLING_THRESHOLD -> { delay = POLLING_DELAY_FAST @@ -103,12 +125,15 @@ class DefaultStatusRepository( override fun refreshStatus(paymentData: String) { adyenLog(AdyenLogLevel.VERBOSE) { "refreshStatus" } - refreshFlow.tryEmit(paymentData) + refreshFlow.trySend(paymentData) } companion object { - private val POLLING_DELAY_FAST = TimeUnit.SECONDS.toMillis(2) - private val POLLING_DELAY_SLOW = TimeUnit.SECONDS.toMillis(10) - private val POLLING_THRESHOLD = TimeUnit.SECONDS.toMillis(60) + private val POLLING_DELAY_FAST = 2.seconds.inWholeMilliseconds + private val POLLING_DELAY_SLOW = 10.seconds.inWholeMilliseconds + private val POLLING_THRESHOLD = 60.seconds.inWholeMilliseconds + + @VisibleForTesting + internal val DEBOUNCE_TIME = 100.milliseconds.inWholeMilliseconds } } diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsMapperTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsMapperTest.kt index 8d2f680eab..6f39100d6e 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsMapperTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsMapperTest.kt @@ -119,7 +119,7 @@ internal class AnalyticsMapperTest { ) val expected = AnalyticsSetupRequest( - version = "5.3.0", + version = "5.3.1", channel = "android", platform = "android", locale = "en_US", diff --git a/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/DefaultStatusRepositoryTest.kt b/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/DefaultStatusRepositoryTest.kt index 0c924c7721..cc529d68b5 100644 --- a/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/DefaultStatusRepositoryTest.kt +++ b/components-core/src/test/java/com/adyen/checkout/components/core/internal/data/api/DefaultStatusRepositoryTest.kt @@ -8,72 +8,147 @@ package com.adyen.checkout.components.core.internal.data.api -import app.cash.turbine.test import com.adyen.checkout.components.core.internal.data.model.StatusResponse +import com.adyen.checkout.test.LoggingExtension import com.adyen.checkout.test.TestDispatcherExtension +import com.adyen.checkout.test.extensions.test +import kotlinx.coroutines.CancellationException import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.cancel +import kotlinx.coroutines.test.TestCoroutineScheduler +import kotlinx.coroutines.test.UnconfinedTestDispatcher +import kotlinx.coroutines.test.advanceUntilIdle import kotlinx.coroutines.test.runTest +import kotlinx.coroutines.test.testTimeSource import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.Assertions.assertInstanceOf +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith import org.mockito.Mock import org.mockito.junit.jupiter.MockitoExtension import org.mockito.kotlin.any import org.mockito.kotlin.doReturn +import org.mockito.kotlin.times +import org.mockito.kotlin.verify import org.mockito.kotlin.whenever -import java.util.concurrent.TimeUnit +import kotlin.time.Duration.Companion.minutes +import kotlin.time.ExperimentalTime +import kotlin.time.TimeSource -@OptIn(ExperimentalCoroutinesApi::class) -@ExtendWith(MockitoExtension::class, TestDispatcherExtension::class) +@OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class) +@ExtendWith(MockitoExtension::class, TestDispatcherExtension::class, LoggingExtension::class) internal class DefaultStatusRepositoryTest( @Mock private val statusService: StatusService ) { private lateinit var statusRepository: DefaultStatusRepository - @BeforeEach - fun beforeEach() { - statusRepository = DefaultStatusRepository(statusService, "someclientkey") - } - @Test fun `when receiving the final result, then it should be emitted and the flow should end`() = runTest { + statusRepository = createRepository(testScheduler, testTimeSource) val response = StatusResponse(resultCode = "final") whenever(statusService.checkStatus(any(), any())) doReturn response - statusRepository - .poll("paymentData", DEFAULT_MAX_POLLING_DURATION) - .test { - val expected = Result.success(response) - assertEquals(expected, awaitItem()) + val statusFlow = statusRepository + .poll("paymentData", MAX_POLLING_DURATION) + .test(testScheduler) + + advanceUntilIdle() + + val expected = Result.success(response) + assertEquals(expected, statusFlow.latestValue) - cancelAndIgnoreRemainingEvents() - } + statusFlow.cancel() } @Test fun `when refreshing the status, then the result is emitted immediately`() = runTest { + statusRepository = createRepository(testScheduler, testTimeSource) val refreshResponse = StatusResponse(resultCode = "refresh") whenever(statusService.checkStatus(any(), any())) - // return final result first, so polling stops - .doReturn(StatusResponse(resultCode = "final"), refreshResponse) + .doReturn(StatusResponse(resultCode = "pending"), refreshResponse) - statusRepository - .poll("paymentData", DEFAULT_MAX_POLLING_DURATION) - .test { - skipItems(1) + val statusFlow = statusRepository + .poll("paymentData", MAX_POLLING_DURATION) + .test(testScheduler) - statusRepository.refreshStatus("test") + statusRepository.refreshStatus("test") + + advanceUntilIdle() + + val expected = Result.success(refreshResponse) + assertEquals(expected, statusFlow.latestValue) + + statusFlow.cancel() + } - val expected = Result.success(refreshResponse) - assertEquals(expected, awaitItem()) + @Test + fun `when fetching the status multiple times at the same time, then it is only fetched once`() = runTest { + statusRepository = createRepository(testScheduler, testTimeSource) + whenever(statusService.checkStatus(any(), any())) doReturn StatusResponse(resultCode = "pending") + + val statusFlow = statusRepository + .poll("paymentData", MAX_POLLING_DURATION) + .test(testScheduler) + + statusRepository.refreshStatus("test") + statusRepository.refreshStatus("test") + statusRepository.refreshStatus("test") + + testScheduler.advanceTimeBy(DefaultStatusRepository.DEBOUNCE_TIME + 1) + + verify(statusService, times(1)).checkStatus(any(), any()) + + statusFlow.cancel() + } + + @Test + fun `when polling result is final, then the flow is cancelled`() = runTest { + statusRepository = createRepository(testScheduler, testTimeSource) + whenever(statusService.checkStatus(any(), any())) doReturn StatusResponse(resultCode = "authorised") + + val statusFlow = statusRepository + .poll("paymentData", MAX_POLLING_DURATION) + .test(testScheduler) + + testScheduler.advanceTimeBy(DefaultStatusRepository.DEBOUNCE_TIME + 1) + + assertInstanceOf(CancellationException::class.java, statusFlow.completionThrowable) + + statusFlow.cancel() + } + + @Test + fun `when max polling time is exceeded, then a value is emitted and the flow is cancelled`() = runTest { + statusRepository = createRepository(testScheduler, testTimeSource) + whenever(statusService.checkStatus(any(), any())) doReturn StatusResponse(resultCode = "pending") + + val statusFlow = statusRepository + .poll("paymentData", MAX_POLLING_DURATION) + .test(testScheduler) + + testScheduler.advanceTimeBy(MAX_POLLING_DURATION + 2100) + + assertTrue(statusFlow.latestValue.isFailure) + assertInstanceOf(CancellationException::class.java, statusFlow.completionThrowable) + + statusFlow.cancel() + } - cancelAndIgnoreRemainingEvents() - } + private fun createRepository( + testScheduler: TestCoroutineScheduler, + testTimeSource: TimeSource + ): DefaultStatusRepository { + return DefaultStatusRepository( + statusService = statusService, + clientKey = "someclientkey", + timeSource = testTimeSource, + coroutineDispatcher = UnconfinedTestDispatcher(testScheduler), + ) } companion object { - private val DEFAULT_MAX_POLLING_DURATION = TimeUnit.MINUTES.toMillis(10) + private val MAX_POLLING_DURATION = 1.minutes.inWholeMilliseconds } } diff --git a/config/detekt/detekt-baseline.xml b/config/detekt/detekt-baseline.xml index c59c4cf892..91a8740e51 100644 --- a/config/detekt/detekt-baseline.xml +++ b/config/detekt/detekt-baseline.xml @@ -11,14 +11,5 @@ - ForbiddenComment:Logger.kt$Logger$// TODO: 14/02/2019 The idea is for this class to have a system where we can send a stream of logs to the merchant - ForbiddenComment:CardView.kt$CardView$// TODO: 29/01/2021 get this logic from OutputData - ForbiddenComment:VoucherAction.kt$VoucherAction$// TODO: remove url when it's fixed from backend side - ForbiddenComment:ActionComponentDialogFragment.kt$ActionComponentDialogFragment$// TODO: trigger download image flow when user accept storage permission after checking permission type - ForbiddenComment:ActionComponentDialogFragment.kt$ActionComponentDialogFragment$// TODO: checkout_rationale_title_storage_permission and checkout_rationale_message_storage_permission - ForbiddenComment:ActionComponentDialogFragment.kt$ActionComponentDialogFragment$// TODO: can be reused based on required permission - ForbiddenComment:DefaultVoucherDelegate.kt$DefaultVoucherDelegate$// TODO: remove action.url when it's fixed from backend side - ForbiddenComment:CheckoutSessionInitializer.kt$CheckoutSessionInitializer$// TODO: Once Backend provides the correct amount in the SessionSetupResponse use that in SessionDetails instead of - ForbiddenComment:SessionDetails.kt$// TODO: Once Backend provides the correct amount in the SessionSetupResponse use that in SessionDetails diff --git a/config/gradle/versionName.gradle b/config/gradle/buildConfig.gradle similarity index 85% rename from config/gradle/versionName.gradle rename to config/gradle/buildConfig.gradle index 21cb75cc9f..f43cf2bbcb 100644 --- a/config/gradle/versionName.gradle +++ b/config/gradle/buildConfig.gradle @@ -10,5 +10,8 @@ android { defaultConfig { buildConfigField "String", "CHECKOUT_VERSION", "\"$version_name\"" } -} + buildFeatures { + buildConfig true + } +} diff --git a/config/gradle/ci.gradle b/config/gradle/ci.gradle deleted file mode 100644 index 96c11a7606..0000000000 --- a/config/gradle/ci.gradle +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2019 Adyen N.V. - * - * This file is open source and available under the MIT license. See the LICENSE file for more info. - * - * Created by ran on 6/2/2019. - */ - -// Notice: The connected android tests are disabled on CI, since Android Studio doesn't -// officially support macOS Mojave which runs on the Jenkins server. -// Re-enable it after Android Studio will officially support macOS Mojave, -// or Android releases will run on a dedicated Jenkins server which runs macOS -// that supports Android Studio. -task ci(dependsOn: ['check', 'test', 'connectedAndroidTest']) { - description = "Continiues integration task dependes on 'check' 'test' and 'runConnectedAndroidTest' tasks." - group = "verification" -} \ No newline at end of file diff --git a/config/gradle/dependencyGraph.gradle b/config/gradle/dependencyGraph.gradle index b22a19f8e5..954843f391 100644 --- a/config/gradle/dependencyGraph.gradle +++ b/config/gradle/dependencyGraph.gradle @@ -1,5 +1,5 @@ // From: https://github.com/tfcporciuncula/readme-graph/blob/master/gradle/projectDependencyGraph.gradle -task dependencyGraph { +tasks.register("dependencyGraph") { doLast { def dot = new File(rootProject.rootDir, 'dependency-graph/project.dot') dot.parentFile.mkdirs() @@ -43,7 +43,7 @@ task dependencyGraph { javaProjects.add(project) } - project.configurations.all { config -> + project.configurations.configureEach { config -> config.dependencies .withType(ProjectDependency) .collect { it.dependencyProject } @@ -97,7 +97,7 @@ task dependencyGraph { dot << '\n # Dependencies\n\n' dependencies.forEach { key, traits -> - dot << " \"${key.first.path}\" -> \"${key.second.path}\"" + dot << " \"${key.v1.path}\" -> \"${key.v2.path}\"" if (!traits.isEmpty()) { dot << " [${traits.join(", ")}]" } diff --git a/config/gradle/dokka.gradle b/config/gradle/dokka.gradle index e74946e12f..9494fbbfba 100644 --- a/config/gradle/dokka.gradle +++ b/config/gradle/dokka.gradle @@ -10,7 +10,8 @@ project.plugins.withId("kotlin-android") { apply plugin: "org.jetbrains.dokka" - task javadocJar(type: Jar, dependsOn: dokkaJavadoc) { + tasks.register("javadocJar", Jar) { + dependsOn tasks.named("dokkaJavadoc") archiveClassifier.set('javadoc') from dokkaJavadoc.outputDirectory } diff --git a/config/gradle/dokkaRoot.gradle b/config/gradle/dokkaRoot.gradle index 7091bca5b6..8ce02b9404 100644 --- a/config/gradle/dokkaRoot.gradle +++ b/config/gradle/dokkaRoot.gradle @@ -9,7 +9,7 @@ apply plugin: "org.jetbrains.dokka" tasks.named("dokkaHtmlMultiModule") { - def dokkaDir = "$rootProject.buildDir/docs" + def dokkaDir = "${rootProject.layout.buildDirectory.get().asFile}/docs" outputDirectory.set(file(dokkaDir)) doLast { copy { diff --git a/config/gradle/runConnectedAndroidTest.gradle b/config/gradle/runConnectedAndroidTest.gradle deleted file mode 100644 index 52199acbe1..0000000000 --- a/config/gradle/runConnectedAndroidTest.gradle +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2019 Adyen N.V. - * - * This file is open source and available under the MIT license. See the LICENSE file for more info. - * - * Created by ran on 8/2/2019. - */ - -task runConnectedAndroidTest(type: Exec) { - description = "Runs connected android test on dedicated AVDs." - group = "verification" - - final projectDir = "$rootProject.projectDir" - final scriptsDir = "$projectDir/config/scripts" - final moduleName = "$project.name" - final moduleVersion = "$project.version_name" - - workingDir "$scriptsDir" - - // TODO disabling instrumented tests until we can make them reliable -// commandLine './run_connected_android_test.sh', "$moduleName", "$moduleVersion" -} \ No newline at end of file diff --git a/config/gradle/sharedTasks.gradle b/config/gradle/sharedTasks.gradle index 84248bbd4a..2c21cbdb1e 100644 --- a/config/gradle/sharedTasks.gradle +++ b/config/gradle/sharedTasks.gradle @@ -7,8 +7,6 @@ * Created by caiof on 11/2/2019. */ -apply from: "${rootDir}/config/gradle/versionName.gradle" +apply from: "${rootDir}/config/gradle/buildConfig.gradle" apply from: "${rootDir}/config/gradle/codeQuality.gradle" -apply from: "${rootDir}/config/gradle/ci.gradle" apply from: "${rootDir}/config/gradle/release.gradle" -apply from: "${rootDir}/config/gradle/runConnectedAndroidTest.gradle" diff --git a/config/gradle/sources.gradle b/config/gradle/sources.gradle index b7eada6e03..ee680912c8 100644 --- a/config/gradle/sources.gradle +++ b/config/gradle/sources.gradle @@ -6,11 +6,11 @@ * Created by ran on 6/2/2019. */ -task androidSourcesJar(type: Jar) { +tasks.register("androidSourcesJar", Jar) { archiveClassifier.set('sources') if (project.plugins.findPlugin("com.android.library")) { from android.sourceSets.main.java.srcDirs } else { from sourceSets.main.java.srcDirs } -} \ No newline at end of file +} diff --git a/config/module/template/build.gradle b/config/module/template/build.gradle index 9440cc3aa3..a9cdb3bf30 100644 --- a/config/module/template/build.gradle +++ b/config/module/template/build.gradle @@ -10,11 +10,11 @@ ext.mavenArtifactDescription = "Adyen checkout #module_name component client for apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version + minSdk min_sdk_version + targetSdk target_sdk_version versionCode version_code versionName version_name diff --git a/convenience-stores-jp/build.gradle b/convenience-stores-jp/build.gradle index 5c0c334f07..a0f8579628 100644 --- a/convenience-stores-jp/build.gradle +++ b/convenience-stores-jp/build.gradle @@ -13,13 +13,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.conveniencestoresjp' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/convenience-stores-jp/src/main/java/com/adyen/checkout/conveniencestoresjp/ConvenienceStoresJPConfiguration.kt b/convenience-stores-jp/src/main/java/com/adyen/checkout/conveniencestoresjp/ConvenienceStoresJPConfiguration.kt index 7b09b795e8..3cab0365d6 100644 --- a/convenience-stores-jp/src/main/java/com/adyen/checkout/conveniencestoresjp/ConvenienceStoresJPConfiguration.kt +++ b/convenience-stores-jp/src/main/java/com/adyen/checkout/conveniencestoresjp/ConvenienceStoresJPConfiguration.kt @@ -112,7 +112,7 @@ fun CheckoutConfiguration.convenienceStoresJP( return this } -fun CheckoutConfiguration.getConvenienceStoresJPConfiguration(): ConvenienceStoresJPConfiguration? { +internal fun CheckoutConfiguration.getConvenienceStoresJPConfiguration(): ConvenienceStoresJPConfiguration? { return getConfiguration(PaymentMethodTypes.ECONTEXT_STORES) } diff --git a/cse/build.gradle b/cse/build.gradle index b901eb3604..031932101a 100644 --- a/cse/build.gradle +++ b/cse/build.gradle @@ -13,13 +13,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.cse' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/dependencies.gradle b/dependencies.gradle index 92212156db..db49c46394 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -16,19 +16,19 @@ ext { // just for example app, don't need to increment version_code = 1 // The version_name format is "major.minor.patch(-(alpha|beta|rc)[0-9]{2}){0,1}" (e.g. 3.0.0, 3.1.1-alpha04 or 3.1.4-rc01 etc). - version_name = "5.3.0" + version_name = "5.3.1" // Build Script - android_gradle_plugin_version = '8.2.0' + android_gradle_plugin_version = '8.3.1' kotlin_version = '1.9.22' - detekt_gradle_plugin_version = "1.23.4" + detekt_gradle_plugin_version = "1.23.5" dokka_version = "1.9.10" hilt_version = "2.50" compose_compiler_version = '1.5.8' // Code quality - detekt_version = "1.23.4" - jacoco_version = '0.8.9' + detekt_version = "1.23.5" + jacoco_version = '0.8.11' ktlint_version = '1.0.1' sonarqube_version = '4.4.1.3373' @@ -45,9 +45,9 @@ ext { // Compose Dependencies compose_activity_version = '1.8.2' - compose_bom_version = '2023.10.01' - compose_hilt_version = '1.1.0' - compose_viewmodel_version = '2.6.2' + compose_bom_version = '2024.02.00' + compose_hilt_version = '1.2.0' + compose_viewmodel_version = '2.7.0' // Adyen Dependencies adyen3ds2_version = "2.2.15" diff --git a/dependency-graph/project.dot b/dependency-graph/project.dot index 337a0c94f2..964df7374d 100644 --- a/dependency-graph/project.dot +++ b/dependency-graph/project.dot @@ -6,17 +6,25 @@ digraph { # Projects ":3ds2" [fillcolor="#baffc9"]; + ":ach" [fillcolor="#baffc9"]; ":action" [fillcolor="#baffc9"]; + ":action-core" [fillcolor="#baffc9"]; ":await" [fillcolor="#baffc9"]; ":bacs" [fillcolor="#baffc9"]; ":bcmc" [fillcolor="#baffc9"]; ":blik" [fillcolor="#baffc9"]; + ":boleto" [fillcolor="#baffc9"]; ":card" [fillcolor="#baffc9"]; + ":cashapppay" [fillcolor="#baffc9"]; ":checkout-core" [fillcolor="#baffc9"]; + ":components-compose" [fillcolor="#baffc9"]; ":components-core" [fillcolor="#baffc9"]; + ":convenience-stores-jp" [fillcolor="#baffc9"]; ":cse" [fillcolor="#baffc9"]; ":dotpay" [fillcolor="#baffc9"]; ":drop-in" [fillcolor="#baffc9"]; + ":drop-in-compose" [fillcolor="#baffc9"]; + ":econtext" [fillcolor="#baffc9"]; ":entercash" [fillcolor="#baffc9"]; ":eps" [fillcolor="#baffc9"]; ":example-app" [fillcolor="#baffc9"]; @@ -29,16 +37,20 @@ digraph { ":molpay" [fillcolor="#baffc9"]; ":online-banking-core" [fillcolor="#baffc9"]; ":online-banking-cz" [fillcolor="#baffc9"]; + ":online-banking-jp" [fillcolor="#baffc9"]; ":online-banking-pl" [fillcolor="#baffc9"]; ":online-banking-sk" [fillcolor="#baffc9"]; ":openbanking" [fillcolor="#baffc9"]; ":paybybank" [fillcolor="#baffc9"]; + ":payeasy" [fillcolor="#baffc9"]; ":qr-code" [fillcolor="#baffc9"]; ":redirect" [fillcolor="#baffc9"]; ":sepa" [fillcolor="#baffc9"]; ":sessions-core" [fillcolor="#baffc9"]; + ":seven-eleven" [fillcolor="#baffc9"]; ":test-core" [fillcolor="#baffc9"]; ":ui-core" [fillcolor="#baffc9"]; + ":upi" [fillcolor="#baffc9"]; ":voucher" [fillcolor="#baffc9"]; ":wechatpay" [fillcolor="#baffc9"]; @@ -46,52 +58,26 @@ digraph { # Dependencies - ":3ds2" -> ":ui-core" - ":3ds2" -> ":3ds2" - ":3ds2" -> ":test-core" [style=dotted] - ":action" -> ":3ds2" - ":action" -> ":await" - ":action" -> ":qr-code" - ":action" -> ":redirect" - ":action" -> ":wechatpay" - ":action" -> ":voucher" - ":action" -> ":action" - ":action" -> ":test-core" [style=dotted] - ":await" -> ":ui-core" - ":await" -> ":await" - ":await" -> ":test-core" [style=dotted] - ":bacs" -> ":action" + ":bacs" -> ":action-core" ":bacs" -> ":ui-core" + ":bacs" -> ":sessions-core" ":bacs" -> ":bacs" ":bacs" -> ":test-core" [style=dotted] - ":bcmc" -> ":action" - ":bcmc" -> ":card" - ":bcmc" -> ":bcmc" - ":bcmc" -> ":test-core" [style=dotted] - ":blik" -> ":action" + ":blik" -> ":action-core" ":blik" -> ":ui-core" + ":blik" -> ":sessions-core" ":blik" -> ":blik" ":blik" -> ":test-core" [style=dotted] - ":card" -> ":action" - ":card" -> ":cse" - ":card" -> ":ui-core" - ":card" -> ":sessions-core" - ":card" -> ":card" - ":card" -> ":test-core" [style=dotted] - ":checkout-core" -> ":checkout-core" - ":components-core" -> ":checkout-core" - ":components-core" -> ":components-core" - ":components-core" -> ":test-core" [style=dotted] - ":cse" -> ":checkout-core" - ":cse" -> ":cse" - ":dotpay" -> ":action" - ":dotpay" -> ":issuer-list" - ":dotpay" -> ":dotpay" - ":drop-in" -> ":action" + ":drop-in" -> ":3ds2" + ":drop-in" -> ":ach" + ":drop-in" -> ":action-core" ":drop-in" -> ":bacs" ":drop-in" -> ":bcmc" + ":drop-in" -> ":boleto" ":drop-in" -> ":blik" ":drop-in" -> ":card" + ":drop-in" -> ":cashapppay" + ":drop-in" -> ":convenience-stores-jp" ":drop-in" -> ":dotpay" ":drop-in" -> ":entercash" ":drop-in" -> ":eps" @@ -102,90 +88,192 @@ digraph { ":drop-in" -> ":mbway" ":drop-in" -> ":molpay" ":drop-in" -> ":online-banking-cz" + ":drop-in" -> ":online-banking-jp" ":drop-in" -> ":online-banking-pl" ":drop-in" -> ":online-banking-sk" ":drop-in" -> ":openbanking" + ":drop-in" -> ":payeasy" ":drop-in" -> ":paybybank" ":drop-in" -> ":sepa" + ":drop-in" -> ":seven-eleven" ":drop-in" -> ":sessions-core" + ":drop-in" -> ":upi" + ":drop-in" -> ":wechatpay" ":drop-in" -> ":drop-in" ":drop-in" -> ":test-core" [style=dotted] - ":entercash" -> ":action" - ":entercash" -> ":issuer-list" - ":entercash" -> ":entercash" - ":eps" -> ":action" - ":eps" -> ":issuer-list" - ":eps" -> ":eps" - ":example-app" -> ":example-app" - ":example-app" -> ":drop-in" [style=dotted] - ":giftcard" -> ":action" - ":giftcard" -> ":cse" - ":giftcard" -> ":ui-core" - ":giftcard" -> ":giftcard" - ":giftcard" -> ":test-core" [style=dotted] - ":googlepay" -> ":action" - ":googlepay" -> ":components-core" - ":googlepay" -> ":googlepay" - ":googlepay" -> ":test-core" [style=dotted] - ":ideal" -> ":action" - ":ideal" -> ":issuer-list" - ":ideal" -> ":ideal" - ":instant" -> ":action" - ":instant" -> ":components-core" + ":online-banking-core" -> ":action-core" + ":online-banking-core" -> ":ui-core" + ":online-banking-core" -> ":sessions-core" + ":online-banking-core" -> ":online-banking-core" + ":online-banking-core" -> ":test-core" [style=dotted] + ":voucher" -> ":ui-core" + ":voucher" -> ":voucher" + ":voucher" -> ":test-core" [style=dotted] + ":ach" -> ":action-core" + ":ach" -> ":ui-core" + ":ach" -> ":cse" + ":ach" -> ":sessions-core" + ":ach" -> ":ach" + ":ach" -> ":test-core" [style=dotted] + ":boleto" -> ":action-core" + ":boleto" -> ":ui-core" + ":boleto" -> ":sessions-core" + ":boleto" -> ":boleto" + ":boleto" -> ":test-core" [style=dotted] + ":dotpay" -> ":action-core" + ":dotpay" -> ":issuer-list" + ":dotpay" -> ":dotpay" + ":qr-code" -> ":ui-core" + ":qr-code" -> ":qr-code" + ":qr-code" -> ":test-core" [style=dotted] + ":action-core" -> ":await" + ":action-core" -> ":qr-code" + ":action-core" -> ":redirect" + ":action-core" -> ":voucher" + ":action-core" -> ":3ds2" [style=dotted] + ":action-core" -> ":wechatpay" [style=dotted] + ":action-core" -> ":action-core" + ":action-core" -> ":test-core" [style=dotted] + ":checkout-core" -> ":checkout-core" + ":components-core" -> ":checkout-core" + ":components-core" -> ":components-core" + ":components-core" -> ":test-core" [style=dotted] + ":instant" -> ":action-core" + ":instant" -> ":sessions-core" ":instant" -> ":instant" ":instant" -> ":test-core" [style=dotted] - ":issuer-list" -> ":action" + ":issuer-list" -> ":action-core" ":issuer-list" -> ":ui-core" + ":issuer-list" -> ":sessions-core" ":issuer-list" -> ":issuer-list" + ":issuer-list" -> ":3ds2" [style=dotted] ":issuer-list" -> ":test-core" [style=dotted] - ":mbway" -> ":action" + ":issuer-list" -> ":wechatpay" [style=dotted] + ":molpay" -> ":action-core" + ":molpay" -> ":issuer-list" + ":molpay" -> ":molpay" + ":mbway" -> ":action-core" ":mbway" -> ":ui-core" + ":mbway" -> ":sessions-core" ":mbway" -> ":mbway" ":mbway" -> ":test-core" [style=dotted] - ":molpay" -> ":action" - ":molpay" -> ":issuer-list" - ":molpay" -> ":molpay" - ":online-banking-core" -> ":action" - ":online-banking-core" -> ":ui-core" - ":online-banking-core" -> ":online-banking-core" - ":online-banking-core" -> ":test-core" [style=dotted] - ":online-banking-cz" -> ":action" - ":online-banking-cz" -> ":online-banking-core" - ":online-banking-cz" -> ":online-banking-cz" - ":online-banking-pl" -> ":action" + ":seven-eleven" -> ":econtext" + ":seven-eleven" -> ":seven-eleven" + ":await" -> ":ui-core" + ":await" -> ":await" + ":await" -> ":test-core" [style=dotted] + ":online-banking-pl" -> ":action-core" ":online-banking-pl" -> ":issuer-list" ":online-banking-pl" -> ":online-banking-pl" - ":online-banking-sk" -> ":action" - ":online-banking-sk" -> ":online-banking-core" - ":online-banking-sk" -> ":online-banking-sk" - ":openbanking" -> ":action" - ":openbanking" -> ":issuer-list" - ":openbanking" -> ":openbanking" - ":paybybank" -> ":action" + ":action" -> ":3ds2" + ":action" -> ":action-core" + ":action" -> ":wechatpay" + ":action" -> ":action" + ":action" -> ":test-core" [style=dotted] + ":test-core" -> ":test-core" + ":test-core" -> ":checkout-core" [style=dotted] + ":online-banking-cz" -> ":action-core" + ":online-banking-cz" -> ":online-banking-core" + ":online-banking-cz" -> ":online-banking-cz" + ":paybybank" -> ":action-core" ":paybybank" -> ":components-core" ":paybybank" -> ":issuer-list" + ":paybybank" -> ":sessions-core" ":paybybank" -> ":paybybank" ":paybybank" -> ":test-core" [style=dotted] - ":qr-code" -> ":ui-core" - ":qr-code" -> ":qr-code" - ":qr-code" -> ":test-core" [style=dotted] + ":example-app" -> ":example-app" + ":example-app" -> ":drop-in" [style=dotted] + ":example-app" -> ":components-compose" [style=dotted] ":redirect" -> ":ui-core" ":redirect" -> ":redirect" ":redirect" -> ":test-core" [style=dotted] - ":sepa" -> ":action" + ":online-banking-jp" -> ":econtext" + ":online-banking-jp" -> ":online-banking-jp" + ":ideal" -> ":action-core" + ":ideal" -> ":issuer-list" + ":ideal" -> ":ideal" + ":components-compose" -> ":components-core" + ":components-compose" -> ":sessions-core" + ":components-compose" -> ":ui-core" + ":components-compose" -> ":components-compose" + ":giftcard" -> ":action-core" + ":giftcard" -> ":cse" + ":giftcard" -> ":ui-core" + ":giftcard" -> ":sessions-core" + ":giftcard" -> ":giftcard" + ":giftcard" -> ":test-core" [style=dotted] + ":econtext" -> ":ui-core" + ":econtext" -> ":action-core" + ":econtext" -> ":sessions-core" + ":econtext" -> ":econtext" + ":econtext" -> ":3ds2" [style=dotted] + ":econtext" -> ":test-core" [style=dotted] + ":econtext" -> ":wechatpay" [style=dotted] + ":3ds2" -> ":ui-core" + ":3ds2" -> ":3ds2" + ":3ds2" -> ":test-core" [style=dotted] + ":entercash" -> ":action-core" + ":entercash" -> ":issuer-list" + ":entercash" -> ":entercash" + ":eps" -> ":action-core" + ":eps" -> ":issuer-list" + ":eps" -> ":eps" + ":openbanking" -> ":action-core" + ":openbanking" -> ":issuer-list" + ":openbanking" -> ":openbanking" + ":convenience-stores-jp" -> ":econtext" + ":convenience-stores-jp" -> ":convenience-stores-jp" + ":convenience-stores-jp" -> ":test-core" [style=dotted] + ":googlepay" -> ":3ds2" + ":googlepay" -> ":action-core" + ":googlepay" -> ":components-core" + ":googlepay" -> ":sessions-core" + ":googlepay" -> ":googlepay" + ":googlepay" -> ":test-core" [style=dotted] + ":upi" -> ":action-core" + ":upi" -> ":ui-core" + ":upi" -> ":sessions-core" + ":upi" -> ":upi" + ":upi" -> ":test-core" [style=dotted] + ":drop-in-compose" -> ":drop-in" + ":drop-in-compose" -> ":drop-in-compose" + ":cashapppay" -> ":action-core" + ":cashapppay" -> ":components-core" + ":cashapppay" -> ":sessions-core" + ":cashapppay" -> ":ui-core" + ":cashapppay" -> ":cashapppay" + ":cashapppay" -> ":test-core" [style=dotted] + ":payeasy" -> ":econtext" + ":payeasy" -> ":payeasy" + ":cse" -> ":checkout-core" + ":cse" -> ":cse" + ":sepa" -> ":action-core" ":sepa" -> ":ui-core" + ":sepa" -> ":sessions-core" ":sepa" -> ":sepa" ":sepa" -> ":test-core" [style=dotted] - ":sessions-core" -> ":components-core" - ":sessions-core" -> ":sessions-core" - ":sessions-core" -> ":test-core" [style=dotted] - ":test-core" -> ":test-core" ":ui-core" -> ":components-core" ":ui-core" -> ":ui-core" - ":voucher" -> ":ui-core" - ":voucher" -> ":voucher" - ":voucher" -> ":test-core" [style=dotted] ":wechatpay" -> ":ui-core" ":wechatpay" -> ":wechatpay" ":wechatpay" -> ":test-core" [style=dotted] + ":bcmc" -> ":3ds2" + ":bcmc" -> ":action-core" + ":bcmc" -> ":card" + ":bcmc" -> ":sessions-core" + ":bcmc" -> ":bcmc" + ":bcmc" -> ":test-core" [style=dotted] + ":online-banking-sk" -> ":action-core" + ":online-banking-sk" -> ":online-banking-core" + ":online-banking-sk" -> ":online-banking-sk" + ":sessions-core" -> ":components-core" + ":sessions-core" -> ":sessions-core" + ":sessions-core" -> ":test-core" [style=dotted] + ":card" -> ":3ds2" + ":card" -> ":action-core" + ":card" -> ":cse" + ":card" -> ":ui-core" + ":card" -> ":sessions-core" + ":card" -> ":card" + ":card" -> ":test-core" [style=dotted] } diff --git a/dependency-graph/project.dot.png b/dependency-graph/project.dot.png index cb34edec47..0c4d9a9c65 100644 Binary files a/dependency-graph/project.dot.png and b/dependency-graph/project.dot.png differ diff --git a/docs/ADDRESS_LOOKUP.md b/docs/ADDRESS_LOOKUP.md index 1b221e22c9..05e3b913cf 100644 --- a/docs/ADDRESS_LOOKUP.md +++ b/docs/ADDRESS_LOOKUP.md @@ -9,9 +9,52 @@ ``` ## Integrating with Address Lookup Functionality - If you're integrating with Drop-in: - - Implement the mandatory `onAddressLookupQueryChanged(query: String)` callback and optional `onAddressLookupCompletion(lookupAddress: LookupAddress)` callback. + - Implement the mandatory `onAddressLookupQueryChanged(query: String)` callback and optional `onAddressLookupCompletion(lookupAddress: LookupAddress)` callback in your implementation of DropInService. - Pass the result of these actions by using `AddressLookupDropInServiceResult` class. + ```kotlin + override fun onAddressLookupQueryChanged(query: String) { + // Use the query parameter to make a call to your desired maps endpoint + // Map the address objects LookupAddress object and + // pass it back to Drop-in as follows: + sendAddressLookupResult(AddressLookupDropInServiceResult.LookupResult(options)) + } + + // Optionally use this callback to get the complete details for a LookupAddress option selected by the shopper + override fun onAddressLookupCompletion(lookupAddress: LookupAddress): Boolean { + // Make a call to your desired maps endpoint and pass the complete + // LookupAddress object back to Drop-in as follows: + sendAddressLookupResult(AddressLookupDropInServiceResult.LookupComplete(completeLookupAddress)) + return true // Return false if you do not need to make an api call + + } + ``` - If you're integrating with standalone `CardComponent`: - Set `AddressLookupCallback` via `CardComponent.setAddressLookupCallback(AddressLookupCallback)` function to receive the related events. - Pass the result of these actions by calling `CardComponent.setAddressLookupResult(addressLookupResult: AddressLookupResult)`. + ```kotlin + cardComponent.setAddressLookupCallback(object : AddressLookupCallback { + override fun onQueryChanged(query: String) { + // Use the query parameter to make a call to your desired maps endpoint + // Map the address objects LookupAddress object and + // pass it back to card component as follows: + cardComponent.updateAddressLookupOptions(options) + } + + // Optionally use this callback to get the complete details for a LookupAddress option selected by the shopper + override fun onLookupCompletion(lookupAddress: LookupAddress): Boolean { + // Make a call to your desired maps endpoint and pass the complete + // LookupAddress object back to card component as follows: + cardComponent.setAddressLookupResult(AddressLookupResult.Completed(completeLookupAddress)) + return true // Return false if you do not need to make an api call + } + }) + ``` - Delegate back pressed event to `CardComponent` by calling `CardComponent.handleBackPress()` which returns true if the back press is handled by Adyen SDK and false otherwise. + ```kotlin + override fun onBackPressed() { + if (cardComponent?.handleBackPress() == true) return + super.onBackPressed() + } + ``` +## Screenshots +![address-lookup](https://github.com/Adyen/adyen-android/assets/6615094/ee671606-fbf4-4674-96ec-99a804e53d2e) diff --git a/dotpay/build.gradle b/dotpay/build.gradle index 3c38341e1e..dd4376d7dc 100644 --- a/dotpay/build.gradle +++ b/dotpay/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.dotpay' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/dotpay/src/main/java/com/adyen/checkout/dotpay/DotpayConfiguration.kt b/dotpay/src/main/java/com/adyen/checkout/dotpay/DotpayConfiguration.kt index 7ca83938d3..a7399d7d48 100644 --- a/dotpay/src/main/java/com/adyen/checkout/dotpay/DotpayConfiguration.kt +++ b/dotpay/src/main/java/com/adyen/checkout/dotpay/DotpayConfiguration.kt @@ -116,7 +116,7 @@ fun CheckoutConfiguration.dotpay( return this } -fun CheckoutConfiguration.getDotpayConfiguration(): DotpayConfiguration? { +internal fun CheckoutConfiguration.getDotpayConfiguration(): DotpayConfiguration? { return getConfiguration(PaymentMethodTypes.DOTPAY) } diff --git a/drop-in-compose/build.gradle b/drop-in-compose/build.gradle index 6cefd510b4..b6d9386957 100644 --- a/drop-in-compose/build.gradle +++ b/drop-in-compose/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.dropin.compose' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/drop-in/build.gradle b/drop-in/build.gradle index b30a953acc..085efd47b2 100644 --- a/drop-in/build.gradle +++ b/drop-in/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.dropin' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/drop-in/src/main/java/com/adyen/checkout/dropin/DropInConfiguration.kt b/drop-in/src/main/java/com/adyen/checkout/dropin/DropInConfiguration.kt index 2645bbd554..e6df140c20 100644 --- a/drop-in/src/main/java/com/adyen/checkout/dropin/DropInConfiguration.kt +++ b/drop-in/src/main/java/com/adyen/checkout/dropin/DropInConfiguration.kt @@ -475,6 +475,6 @@ fun CheckoutConfiguration.dropIn( return this } -fun CheckoutConfiguration.getDropInConfiguration(): DropInConfiguration? { +internal fun CheckoutConfiguration.getDropInConfiguration(): DropInConfiguration? { return getConfiguration(DROP_IN_CONFIG_KEY) } diff --git a/drop-in/src/test/java/com/adyen/checkout/dropin/DropInConfigurationTest.kt b/drop-in/src/test/java/com/adyen/checkout/dropin/DropInConfigurationTest.kt index 3bcb49bc20..d711e96b1a 100644 --- a/drop-in/src/test/java/com/adyen/checkout/dropin/DropInConfigurationTest.kt +++ b/drop-in/src/test/java/com/adyen/checkout/dropin/DropInConfigurationTest.kt @@ -1,22 +1,18 @@ package com.adyen.checkout.dropin import com.adyen.checkout.adyen3ds2.Adyen3DS2Configuration -import com.adyen.checkout.adyen3ds2.getAdyen3DS2Configuration import com.adyen.checkout.card.CardConfiguration -import com.adyen.checkout.card.getCardConfiguration import com.adyen.checkout.components.core.Amount import com.adyen.checkout.components.core.AnalyticsConfiguration import com.adyen.checkout.components.core.AnalyticsLevel import com.adyen.checkout.components.core.CheckoutConfiguration +import com.adyen.checkout.components.core.PaymentMethodTypes import com.adyen.checkout.core.Environment +import com.adyen.checkout.googlepay.GooglePayComponent import com.adyen.checkout.googlepay.GooglePayConfiguration -import com.adyen.checkout.googlepay.getGooglePayConfiguration import com.adyen.checkout.ideal.IdealConfiguration -import com.adyen.checkout.ideal.getIdealConfiguration import com.adyen.checkout.redirect.RedirectConfiguration -import com.adyen.checkout.redirect.getRedirectConfiguration import com.adyen.checkout.wechatpay.WeChatPayActionConfiguration -import com.adyen.checkout.wechatpay.getWeChatPayActionConfiguration import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test @@ -129,12 +125,14 @@ internal class DropInConfigurationTest { actualDropInConfig?.isRemovingStoredPaymentMethodsEnabled, ) assertEquals(config.overriddenPaymentMethodInformation, actualDropInConfig?.overriddenPaymentMethodInformation) - assertNotNull(actual.getCardConfiguration()) - assertNotNull(actual.getGooglePayConfiguration()) - assertNotNull(actual.getIdealConfiguration()) - assertNotNull(actual.getAdyen3DS2Configuration()) - assertNotNull(actual.getRedirectConfiguration()) - assertNotNull(actual.getWeChatPayActionConfiguration()) + assertNotNull(actual.getConfiguration(PaymentMethodTypes.SCHEME)) + assertNotNull( + GooglePayComponent.PAYMENT_METHOD_TYPES.firstNotNullOfOrNull { key -> actual.getConfiguration(key) }, + ) + assertNotNull(actual.getConfiguration(PaymentMethodTypes.IDEAL)) + assertNotNull(actual.getActionConfiguration(Adyen3DS2Configuration::class.java)) + assertNotNull(actual.getActionConfiguration(RedirectConfiguration::class.java)) + assertNotNull(actual.getActionConfiguration(WeChatPayActionConfiguration::class.java)) } companion object { diff --git a/econtext/build.gradle b/econtext/build.gradle index 6f6d5f89ab..67715bcc74 100644 --- a/econtext/build.gradle +++ b/econtext/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.econtext' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/entercash/build.gradle b/entercash/build.gradle index a828f8ee6d..c794d5f23a 100644 --- a/entercash/build.gradle +++ b/entercash/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.entercash' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/entercash/src/main/java/com/adyen/checkout/entercash/EntercashConfiguration.kt b/entercash/src/main/java/com/adyen/checkout/entercash/EntercashConfiguration.kt index 1a6d5e4d07..c7465bfbc8 100644 --- a/entercash/src/main/java/com/adyen/checkout/entercash/EntercashConfiguration.kt +++ b/entercash/src/main/java/com/adyen/checkout/entercash/EntercashConfiguration.kt @@ -116,7 +116,7 @@ fun CheckoutConfiguration.entercash( return this } -fun CheckoutConfiguration.getEntercashConfiguration(): EntercashConfiguration? { +internal fun CheckoutConfiguration.getEntercashConfiguration(): EntercashConfiguration? { return getConfiguration(PaymentMethodTypes.ENTERCASH) } diff --git a/eps/build.gradle b/eps/build.gradle index d93edaf52f..e9a92f9234 100644 --- a/eps/build.gradle +++ b/eps/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.eps' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/eps/src/main/java/com/adyen/checkout/eps/EPSConfiguration.kt b/eps/src/main/java/com/adyen/checkout/eps/EPSConfiguration.kt index 8034628d7d..b144ff3a3a 100644 --- a/eps/src/main/java/com/adyen/checkout/eps/EPSConfiguration.kt +++ b/eps/src/main/java/com/adyen/checkout/eps/EPSConfiguration.kt @@ -127,7 +127,7 @@ fun CheckoutConfiguration.eps( return this } -fun CheckoutConfiguration.getEPSConfiguration(): EPSConfiguration? { +internal fun CheckoutConfiguration.getEPSConfiguration(): EPSConfiguration? { return getConfiguration(PaymentMethodTypes.EPS) } diff --git a/example-app/build.gradle b/example-app/build.gradle index 7d8c258ece..9d5b04bcdd 100644 --- a/example-app/build.gradle +++ b/example-app/build.gradle @@ -14,31 +14,29 @@ plugins { } apply from: "${rootDir}/config/gradle/codeQuality.gradle" -apply from: "${rootDir}/config/gradle/ci.gradle" if (file("local.gradle").exists()) { apply from: "local.gradle" -} else if (System.getenv('CI')) { - // if building from CI use example file as it is to ensure the build passes +} else if (!isIDEBuild()) { + // if not building from an IDE, use example file as it is to ensure the build passes (for CI, renovate, etc) apply from: "example.local.gradle" } else { throw new GradleException("File example-app/local.gradle not found. Check example-app/README.md for more instructions.") } -// This runConnectedAndroidTest.gradle script is applied, -// so it will be possible to run the example app connected android tests -// in Jenkins release process. -apply from: "${rootDir}/config/gradle/runConnectedAndroidTest.gradle" +def isIDEBuild() { + return project.properties['android.injected.invoked.from.ide'] == 'true' +} android { - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { applicationId "com.adyen.checkout.example" namespace "com.adyen.checkout.example" - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version + minSdk min_sdk_version + targetSdk target_sdk_version versionCode version_code versionName version_name @@ -59,6 +57,7 @@ android { buildFeatures { compose true viewBinding true + buildConfig true } composeOptions { @@ -70,7 +69,8 @@ dependencies { // Checkout implementation project(':drop-in') implementation project(':components-compose') -// implementation "com.adyen.checkout:drop-in:5.3.0" +// implementation "com.adyen.checkout:drop-in:5.3.1" +// implementation "com.adyen.checkout:components-compose:5.3.1" // Dependencies implementation libraries.kotlinCoroutines diff --git a/giftcard/build.gradle b/giftcard/build.gradle index 7b25e98f9e..2182400f76 100644 --- a/giftcard/build.gradle +++ b/giftcard/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.giftcard' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/giftcard/src/main/java/com/adyen/checkout/giftcard/GiftCardConfiguration.kt b/giftcard/src/main/java/com/adyen/checkout/giftcard/GiftCardConfiguration.kt index 30c1002d29..c10c34159c 100644 --- a/giftcard/src/main/java/com/adyen/checkout/giftcard/GiftCardConfiguration.kt +++ b/giftcard/src/main/java/com/adyen/checkout/giftcard/GiftCardConfiguration.kt @@ -146,7 +146,7 @@ fun CheckoutConfiguration.giftCard( return this } -fun CheckoutConfiguration.getGiftCardConfiguration(): GiftCardConfiguration? { +internal fun CheckoutConfiguration.getGiftCardConfiguration(): GiftCardConfiguration? { return getConfiguration(PaymentMethodTypes.GIFTCARD) } diff --git a/googlepay/build.gradle b/googlepay/build.gradle index be28dc94a0..1d499b1379 100644 --- a/googlepay/build.gradle +++ b/googlepay/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.googlepay' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/googlepay/src/main/java/com/adyen/checkout/googlepay/GooglePayConfiguration.kt b/googlepay/src/main/java/com/adyen/checkout/googlepay/GooglePayConfiguration.kt index 53827e4b6e..70a2bb0b4f 100644 --- a/googlepay/src/main/java/com/adyen/checkout/googlepay/GooglePayConfiguration.kt +++ b/googlepay/src/main/java/com/adyen/checkout/googlepay/GooglePayConfiguration.kt @@ -426,10 +426,8 @@ fun CheckoutConfiguration.googlePay( return this } -fun CheckoutConfiguration.getGooglePayConfiguration(): GooglePayConfiguration? { - return GooglePayComponent.PAYMENT_METHOD_TYPES.firstNotNullOfOrNull { key -> - getConfiguration(key) - } +internal fun CheckoutConfiguration.getGooglePayConfiguration(): GooglePayConfiguration? { + return GooglePayComponent.PAYMENT_METHOD_TYPES.firstNotNullOfOrNull { key -> getConfiguration(key) } } internal fun GooglePayConfiguration.toCheckoutConfiguration(): CheckoutConfiguration { diff --git a/gradle.properties b/gradle.properties index 62eaa483d3..abee3a5a78 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,6 @@ android.nonTransitiveRClass=false # Disable some unused build features in the Android Gradle Plugin to improve build speed. android.defaults.buildfeatures.aidl=false -android.defaults.buildfeatures.buildconfig=true android.defaults.buildfeatures.renderscript=false android.defaults.buildfeatures.resvalues=false android.defaults.buildfeatures.shaders=false diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 135300d3c4..8dbd49e9bd 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -20,23 +20,7 @@ - - - - - - - - - - - - - - - - @@ -49,22 +33,6 @@ - - - - - - - - - - - - - - - - @@ -81,14 +49,6 @@ - - - - - - - - @@ -97,38 +57,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -137,48 +65,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -195,14 +86,6 @@ - - - - - - - - @@ -243,21 +126,10 @@ - - - - - - - - - - - @@ -304,20 +176,12 @@ - - - - - - - - - - - + + + - - + + @@ -341,14 +205,6 @@ - - - - - - - - @@ -370,14 +226,6 @@ - - - - - - - - @@ -458,22 +306,6 @@ - - - - - - - - - - - - - - - - @@ -506,114 +338,73 @@ - - - + + + - - + + - - - + + + - - - - + + - - - + + + - - - - + + - - - + + + + + + - - - + + + - - - + + + - - + + - - - + + + - + - - - + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -624,89 +415,97 @@ - - - + + + - - + + - - - + + + - + - - - + + + - - + + - - - + + + - + - - - + + + - - - + + + - + - - - + + + - - + + - - - + + + - + - - - + + + - - + + - - - + + + - + - - - + + + - - + + + + + + + + + + @@ -714,7963 +513,3735 @@ - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - - - - + + - - - + + + - - + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - - - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + - - + + - - - + + + + + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + + + + - - - + + + + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + - - - - - - - - - - - + + + - - - - + + - - - + + + - - - - + + - - - + + + - - - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - - + + - - - + + + - - - - + + - - - + + + - - - - + + - - - + + + - - - - - - + + + - - - - - - + + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + + + + - - - + + + + + + - - - + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + + + - - - + + + - - + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + + + - - - + + + - - + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - - - - + + + - - - - - - + + + - - - - - - + + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - + + - - - + + + - - - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + @@ -8681,110 +4252,105 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - - - - - - + + - - - + + + - - + + - - - + + + - - + + @@ -8941,17 +4507,9 @@ - - - - - - - - - - - + + + @@ -8962,11 +4520,6 @@ - - - - - @@ -8982,22 +4535,14 @@ - - - - - - - - - - - + + + @@ -9016,11 +4561,6 @@ - - - - - @@ -9031,11 +4571,6 @@ - - - - - @@ -9051,14 +4586,6 @@ - - - - - - - - @@ -9123,14 +4650,6 @@ - - - - - - - - @@ -9168,6 +4687,14 @@ + + + + + + + + @@ -9176,22 +4703,22 @@ - - - + + + - - + + - - - + + + - - - + + + @@ -9262,17 +4789,17 @@ - - - + + + - - + + - - - + + + @@ -9328,6 +4855,14 @@ + + + + + + + + @@ -9347,6 +4882,14 @@ + + + + + + + + @@ -9363,6 +4906,11 @@ + + + + + @@ -9373,6 +4921,14 @@ + + + + + + + + @@ -9389,6 +4945,14 @@ + + + + + + + + @@ -9405,14 +4969,6 @@ - - - - - - - - @@ -9450,30 +5006,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -9482,14 +5014,6 @@ - - - - - - - - @@ -9498,14 +5022,6 @@ - - - - - - - - @@ -9514,46 +5030,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -9562,30 +5038,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -9594,60 +5046,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -9658,30 +5062,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -9690,30 +5070,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -9722,30 +5078,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -9754,30 +5086,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -9786,62 +5094,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -9850,50 +5102,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -9910,38 +5123,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -9950,38 +5131,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -9990,38 +5139,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10030,39 +5147,16 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -10071,22 +5165,6 @@ - - - - - - - - - - - - - - - - @@ -10095,22 +5173,6 @@ - - - - - - - - - - - - - - - - @@ -10119,46 +5181,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10167,14 +5189,6 @@ - - - - - - - - @@ -10183,38 +5197,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10223,38 +5205,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10263,46 +5213,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10311,14 +5221,6 @@ - - - - - - - - @@ -10327,165 +5229,28 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + @@ -10496,38 +5261,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10536,38 +5269,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10576,38 +5277,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10616,38 +5285,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10656,38 +5293,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10696,38 +5301,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10736,38 +5309,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10776,38 +5317,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10816,38 +5325,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10857,9 +5334,6 @@ - - - @@ -10880,54 +5354,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10936,14 +5362,6 @@ - - - - - - - - @@ -10952,52 +5370,20 @@ - - - - - - - - - - - - - - - - - - - + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - + + @@ -11008,14 +5394,6 @@ - - - - - - - - @@ -11024,38 +5402,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11064,38 +5410,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11104,179 +5418,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + @@ -11288,9 +5459,6 @@ - - - @@ -11298,17 +5466,6 @@ - - - - - - - - - - - @@ -11354,66 +5511,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11426,16 +5529,6 @@ - - - - - - - - - - @@ -11449,14 +5542,6 @@ - - - - - - - - @@ -11465,38 +5550,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11505,14 +5563,6 @@ - - - - - - - - @@ -11522,9 +5572,6 @@ - - - @@ -11545,6 +5592,14 @@ + + + + + + + + @@ -11553,14 +5608,6 @@ - - - - - - - - @@ -11574,38 +5621,16 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -11614,14 +5639,6 @@ - - - - - - - - @@ -11631,9 +5648,6 @@ - - - @@ -11654,36 +5668,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + @@ -11694,38 +5684,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11734,38 +5692,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11774,26 +5700,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -11815,6 +5721,14 @@ + + + + + + + + @@ -11884,6 +5798,9 @@ + + + @@ -11893,11 +5810,6 @@ - - - - - @@ -11972,14 +5884,6 @@ - - - - - - - - @@ -11993,11 +5897,6 @@ - - - - - @@ -12008,14 +5907,6 @@ - - - - - - - - @@ -12032,11 +5923,6 @@ - - - - - @@ -12047,14 +5933,6 @@ - - - - - - - - @@ -12071,22 +5949,6 @@ - - - - - - - - - - - - - - - - @@ -12119,6 +5981,22 @@ + + + + + + + + + + + + + + + + @@ -12283,14 +6161,6 @@ - - - - - - - - @@ -12304,6 +6174,11 @@ + + + + + @@ -12352,22 +6227,6 @@ - - - - - - - - - - - - - - - - @@ -12376,22 +6235,6 @@ - - - - - - - - - - - - - - - - @@ -12400,22 +6243,6 @@ - - - - - - - - - - - - - - - - @@ -12424,22 +6251,6 @@ - - - - - - - - - - - - - - - - @@ -12448,14 +6259,6 @@ - - - - - - - - @@ -12464,22 +6267,6 @@ - - - - - - - - - - - - - - - - @@ -12488,22 +6275,6 @@ - - - - - - - - - - - - - - - - @@ -12512,22 +6283,6 @@ - - - - - - - - - - - - - - - - @@ -12536,22 +6291,6 @@ - - - - - - - - - - - - - - - - @@ -12560,22 +6299,6 @@ - - - - - - - - - - - - - - - - @@ -12584,22 +6307,6 @@ - - - - - - - - - - - - - - - - @@ -12608,22 +6315,6 @@ - - - - - - - - - - - - - - - - @@ -12640,22 +6331,6 @@ - - - - - - - - - - - - - - - - @@ -12664,22 +6339,6 @@ - - - - - - - - - - - - - - - - @@ -12696,14 +6355,6 @@ - - - - - - - - @@ -12733,11 +6384,6 @@ - - - - - @@ -12815,29 +6461,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ideal/build.gradle b/ideal/build.gradle index 8dc44eb7d5..089fe7fa0b 100644 --- a/ideal/build.gradle +++ b/ideal/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.ideal' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/ideal/src/main/java/com/adyen/checkout/ideal/IdealConfiguration.kt b/ideal/src/main/java/com/adyen/checkout/ideal/IdealConfiguration.kt index 7689faa937..e98a685216 100644 --- a/ideal/src/main/java/com/adyen/checkout/ideal/IdealConfiguration.kt +++ b/ideal/src/main/java/com/adyen/checkout/ideal/IdealConfiguration.kt @@ -116,7 +116,7 @@ fun CheckoutConfiguration.ideal( return this } -fun CheckoutConfiguration.getIdealConfiguration(): IdealConfiguration? { +internal fun CheckoutConfiguration.getIdealConfiguration(): IdealConfiguration? { return getConfiguration(PaymentMethodTypes.IDEAL) } diff --git a/instant/build.gradle b/instant/build.gradle index 1d39816e90..3e641b5001 100644 --- a/instant/build.gradle +++ b/instant/build.gradle @@ -13,13 +13,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.instant' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/instant/src/main/java/com/adyen/checkout/instant/InstantPaymentConfiguration.kt b/instant/src/main/java/com/adyen/checkout/instant/InstantPaymentConfiguration.kt index 00e33f184f..5523eb3058 100644 --- a/instant/src/main/java/com/adyen/checkout/instant/InstantPaymentConfiguration.kt +++ b/instant/src/main/java/com/adyen/checkout/instant/InstantPaymentConfiguration.kt @@ -9,6 +9,7 @@ package com.adyen.checkout.instant import android.content.Context +import androidx.annotation.VisibleForTesting import com.adyen.checkout.action.core.GenericActionConfiguration import com.adyen.checkout.action.core.internal.ActionHandlingPaymentMethodConfigurationBuilder import com.adyen.checkout.components.core.Amount @@ -112,7 +113,8 @@ fun CheckoutConfiguration.instantPayment( return this } -fun CheckoutConfiguration.getInstantPaymentConfiguration( +@VisibleForTesting +internal fun CheckoutConfiguration.getInstantPaymentConfiguration( paymentMethod: String = GLOBAL_INSTANT_CONFIG_KEY, ): InstantPaymentConfiguration? { return getConfiguration(paymentMethod) diff --git a/issuer-list/build.gradle b/issuer-list/build.gradle index a8d453883a..fa5cabdb27 100644 --- a/issuer-list/build.gradle +++ b/issuer-list/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.issuerlist' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/mbway/build.gradle b/mbway/build.gradle index 861d9acaba..dc51b3a268 100644 --- a/mbway/build.gradle +++ b/mbway/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.mbway' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/mbway/src/main/java/com/adyen/checkout/mbway/MBWayConfiguration.kt b/mbway/src/main/java/com/adyen/checkout/mbway/MBWayConfiguration.kt index dbbb8f2d72..60ab451dab 100644 --- a/mbway/src/main/java/com/adyen/checkout/mbway/MBWayConfiguration.kt +++ b/mbway/src/main/java/com/adyen/checkout/mbway/MBWayConfiguration.kt @@ -130,7 +130,7 @@ fun CheckoutConfiguration.mbWay( return this } -fun CheckoutConfiguration.getMBWayConfiguration(): MBWayConfiguration? { +internal fun CheckoutConfiguration.getMBWayConfiguration(): MBWayConfiguration? { return getConfiguration(PaymentMethodTypes.MB_WAY) } diff --git a/molpay/build.gradle b/molpay/build.gradle index f7320fbf47..70ff6332be 100644 --- a/molpay/build.gradle +++ b/molpay/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.molpay' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/molpay/src/main/java/com/adyen/checkout/molpay/MolpayConfiguration.kt b/molpay/src/main/java/com/adyen/checkout/molpay/MolpayConfiguration.kt index af027908b4..ff9fe1a180 100644 --- a/molpay/src/main/java/com/adyen/checkout/molpay/MolpayConfiguration.kt +++ b/molpay/src/main/java/com/adyen/checkout/molpay/MolpayConfiguration.kt @@ -119,7 +119,7 @@ fun CheckoutConfiguration.molpay( return this } -fun CheckoutConfiguration.getMolpayConfiguration(): MolpayConfiguration? { +internal fun CheckoutConfiguration.getMolpayConfiguration(): MolpayConfiguration? { return MolpayComponent.PAYMENT_METHOD_TYPES.firstNotNullOfOrNull { key -> getConfiguration(key) } diff --git a/online-banking-core/build.gradle b/online-banking-core/build.gradle index 87fc835666..c3a05feca8 100644 --- a/online-banking-core/build.gradle +++ b/online-banking-core/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.onlinebankingcore' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/online-banking-cz/build.gradle b/online-banking-cz/build.gradle index 85e1887d24..888b7b47f1 100644 --- a/online-banking-cz/build.gradle +++ b/online-banking-cz/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.onlinebankingcz' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/online-banking-cz/src/main/java/com/adyen/checkout/onlinebankingcz/OnlineBankingCZConfiguration.kt b/online-banking-cz/src/main/java/com/adyen/checkout/onlinebankingcz/OnlineBankingCZConfiguration.kt index d5bef8184d..b429796c33 100644 --- a/online-banking-cz/src/main/java/com/adyen/checkout/onlinebankingcz/OnlineBankingCZConfiguration.kt +++ b/online-banking-cz/src/main/java/com/adyen/checkout/onlinebankingcz/OnlineBankingCZConfiguration.kt @@ -112,7 +112,7 @@ fun CheckoutConfiguration.onlineBankingCZ( return this } -fun CheckoutConfiguration.getOnlineBankingCZConfiguration(): OnlineBankingCZConfiguration? { +internal fun CheckoutConfiguration.getOnlineBankingCZConfiguration(): OnlineBankingCZConfiguration? { return getConfiguration(PaymentMethodTypes.ONLINE_BANKING_CZ) } diff --git a/online-banking-jp/build.gradle b/online-banking-jp/build.gradle index c3164191d3..1ba2949c95 100644 --- a/online-banking-jp/build.gradle +++ b/online-banking-jp/build.gradle @@ -13,13 +13,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.onlinebankingjp' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/online-banking-jp/src/main/java/com/adyen/checkout/onlinebankingjp/OnlineBankingJPConfiguration.kt b/online-banking-jp/src/main/java/com/adyen/checkout/onlinebankingjp/OnlineBankingJPConfiguration.kt index 5f172b421a..99d11149f7 100644 --- a/online-banking-jp/src/main/java/com/adyen/checkout/onlinebankingjp/OnlineBankingJPConfiguration.kt +++ b/online-banking-jp/src/main/java/com/adyen/checkout/onlinebankingjp/OnlineBankingJPConfiguration.kt @@ -112,7 +112,7 @@ fun CheckoutConfiguration.onlineBankingJP( return this } -fun CheckoutConfiguration.getOnlineBankingJPConfiguration(): OnlineBankingJPConfiguration? { +internal fun CheckoutConfiguration.getOnlineBankingJPConfiguration(): OnlineBankingJPConfiguration? { return getConfiguration(PaymentMethodTypes.ECONTEXT_ONLINE) } diff --git a/online-banking-pl/build.gradle b/online-banking-pl/build.gradle index 2480d386b2..716b7ede01 100644 --- a/online-banking-pl/build.gradle +++ b/online-banking-pl/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.onlinebankingpl' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/online-banking-pl/src/main/java/com/adyen/checkout/onlinebankingpl/OnlineBankingPLConfiguration.kt b/online-banking-pl/src/main/java/com/adyen/checkout/onlinebankingpl/OnlineBankingPLConfiguration.kt index f6373e939f..ce6766df5d 100644 --- a/online-banking-pl/src/main/java/com/adyen/checkout/onlinebankingpl/OnlineBankingPLConfiguration.kt +++ b/online-banking-pl/src/main/java/com/adyen/checkout/onlinebankingpl/OnlineBankingPLConfiguration.kt @@ -117,7 +117,7 @@ fun CheckoutConfiguration.onlineBankingPL( return this } -fun CheckoutConfiguration.getOnlineBankingPLConfiguration(): OnlineBankingPLConfiguration? { +internal fun CheckoutConfiguration.getOnlineBankingPLConfiguration(): OnlineBankingPLConfiguration? { return getConfiguration(PaymentMethodTypes.ONLINE_BANKING_PL) } diff --git a/online-banking-sk/build.gradle b/online-banking-sk/build.gradle index 636107cfb4..2f755d3e8b 100644 --- a/online-banking-sk/build.gradle +++ b/online-banking-sk/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.onlinebankingsk' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/online-banking-sk/src/main/java/com/adyen/checkout/onlinebankingsk/OnlineBankingSKConfiguration.kt b/online-banking-sk/src/main/java/com/adyen/checkout/onlinebankingsk/OnlineBankingSKConfiguration.kt index 736fbccbf7..7c5974357b 100644 --- a/online-banking-sk/src/main/java/com/adyen/checkout/onlinebankingsk/OnlineBankingSKConfiguration.kt +++ b/online-banking-sk/src/main/java/com/adyen/checkout/onlinebankingsk/OnlineBankingSKConfiguration.kt @@ -112,7 +112,7 @@ fun CheckoutConfiguration.onlineBankingSK( return this } -fun CheckoutConfiguration.getOnlineBankingSKConfiguration(): OnlineBankingSKConfiguration? { +internal fun CheckoutConfiguration.getOnlineBankingSKConfiguration(): OnlineBankingSKConfiguration? { return getConfiguration(PaymentMethodTypes.ONLINE_BANKING_SK) } diff --git a/openbanking/build.gradle b/openbanking/build.gradle index 7b0946477c..f0dc2b4e04 100644 --- a/openbanking/build.gradle +++ b/openbanking/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.openbanking' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/openbanking/src/main/java/com/adyen/checkout/openbanking/OpenBankingConfiguration.kt b/openbanking/src/main/java/com/adyen/checkout/openbanking/OpenBankingConfiguration.kt index 0faf10a278..b24ea96a4a 100644 --- a/openbanking/src/main/java/com/adyen/checkout/openbanking/OpenBankingConfiguration.kt +++ b/openbanking/src/main/java/com/adyen/checkout/openbanking/OpenBankingConfiguration.kt @@ -116,7 +116,7 @@ fun CheckoutConfiguration.openBanking( return this } -fun CheckoutConfiguration.getOpenBankingConfiguration(): OpenBankingConfiguration? { +internal fun CheckoutConfiguration.getOpenBankingConfiguration(): OpenBankingConfiguration? { return getConfiguration(PaymentMethodTypes.OPEN_BANKING) } diff --git a/paybybank/build.gradle b/paybybank/build.gradle index 584c54a845..c53dd0e344 100644 --- a/paybybank/build.gradle +++ b/paybybank/build.gradle @@ -13,13 +13,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.paybybank' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/paybybank/src/main/java/com/adyen/checkout/paybybank/PayByBankConfiguration.kt b/paybybank/src/main/java/com/adyen/checkout/paybybank/PayByBankConfiguration.kt index d37b1d9a8b..1a2100f367 100644 --- a/paybybank/src/main/java/com/adyen/checkout/paybybank/PayByBankConfiguration.kt +++ b/paybybank/src/main/java/com/adyen/checkout/paybybank/PayByBankConfiguration.kt @@ -110,7 +110,7 @@ fun CheckoutConfiguration.payByBank( return this } -fun CheckoutConfiguration.getPayByBankConfiguration(): PayByBankConfiguration? { +internal fun CheckoutConfiguration.getPayByBankConfiguration(): PayByBankConfiguration? { return getConfiguration(PaymentMethodTypes.PAY_BY_BANK) } diff --git a/payeasy/build.gradle b/payeasy/build.gradle index 96198eb90f..0e7fdea793 100644 --- a/payeasy/build.gradle +++ b/payeasy/build.gradle @@ -13,13 +13,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.payeasy' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/payeasy/src/main/java/com/adyen/checkout/payeasy/PayEasyConfiguration.kt b/payeasy/src/main/java/com/adyen/checkout/payeasy/PayEasyConfiguration.kt index 5832e37dcd..9bc52bab98 100644 --- a/payeasy/src/main/java/com/adyen/checkout/payeasy/PayEasyConfiguration.kt +++ b/payeasy/src/main/java/com/adyen/checkout/payeasy/PayEasyConfiguration.kt @@ -112,7 +112,7 @@ fun CheckoutConfiguration.payEasy( return this } -fun CheckoutConfiguration.getPayEasyConfiguration(): PayEasyConfiguration? { +internal fun CheckoutConfiguration.getPayEasyConfiguration(): PayEasyConfiguration? { return getConfiguration(PaymentMethodTypes.ECONTEXT_ATM) } diff --git a/qr-code/build.gradle b/qr-code/build.gradle index 69f0f11616..a46d987823 100644 --- a/qr-code/build.gradle +++ b/qr-code/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.qrcode' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/qr-code/src/main/java/com/adyen/checkout/qrcode/QRCodeConfiguration.kt b/qr-code/src/main/java/com/adyen/checkout/qrcode/QRCodeConfiguration.kt index 4cf49d0c4f..eb951a2894 100644 --- a/qr-code/src/main/java/com/adyen/checkout/qrcode/QRCodeConfiguration.kt +++ b/qr-code/src/main/java/com/adyen/checkout/qrcode/QRCodeConfiguration.kt @@ -8,6 +8,7 @@ package com.adyen.checkout.qrcode import android.content.Context +import androidx.annotation.VisibleForTesting import com.adyen.checkout.components.core.Amount import com.adyen.checkout.components.core.AnalyticsConfiguration import com.adyen.checkout.components.core.CheckoutConfiguration @@ -105,7 +106,8 @@ fun CheckoutConfiguration.qrCode( return this } -fun CheckoutConfiguration.getQRCodeConfiguration(): QRCodeConfiguration? { +@VisibleForTesting +internal fun CheckoutConfiguration.getQRCodeConfiguration(): QRCodeConfiguration? { return getActionConfiguration(QRCodeConfiguration::class.java) } diff --git a/redirect/build.gradle b/redirect/build.gradle index 58fcfad67f..4345164b38 100644 --- a/redirect/build.gradle +++ b/redirect/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.redirect' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/redirect/src/main/java/com/adyen/checkout/redirect/RedirectConfiguration.kt b/redirect/src/main/java/com/adyen/checkout/redirect/RedirectConfiguration.kt index 9cbba15cbc..43487f61bd 100644 --- a/redirect/src/main/java/com/adyen/checkout/redirect/RedirectConfiguration.kt +++ b/redirect/src/main/java/com/adyen/checkout/redirect/RedirectConfiguration.kt @@ -105,7 +105,7 @@ fun CheckoutConfiguration.redirect( return this } -fun CheckoutConfiguration.getRedirectConfiguration(): RedirectConfiguration? { +internal fun CheckoutConfiguration.getRedirectConfiguration(): RedirectConfiguration? { return getActionConfiguration(RedirectConfiguration::class.java) } diff --git a/sepa/build.gradle b/sepa/build.gradle index faefbd1a57..d1fa975eae 100644 --- a/sepa/build.gradle +++ b/sepa/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.sepa' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/sepa/src/main/java/com/adyen/checkout/sepa/SepaConfiguration.kt b/sepa/src/main/java/com/adyen/checkout/sepa/SepaConfiguration.kt index 126568c3b9..79819d4605 100644 --- a/sepa/src/main/java/com/adyen/checkout/sepa/SepaConfiguration.kt +++ b/sepa/src/main/java/com/adyen/checkout/sepa/SepaConfiguration.kt @@ -130,7 +130,7 @@ fun CheckoutConfiguration.sepa( return this } -fun CheckoutConfiguration.getSepaConfiguration(): SepaConfiguration? { +internal fun CheckoutConfiguration.getSepaConfiguration(): SepaConfiguration? { return getConfiguration(PaymentMethodTypes.SEPA) } diff --git a/sessions-core/build.gradle b/sessions-core/build.gradle index 832563c3bf..2ba8299302 100644 --- a/sessions-core/build.gradle +++ b/sessions-core/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.sessions.core' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/sessions-core/src/main/java/com/adyen/checkout/sessions/core/internal/CheckoutSessionInitializer.kt b/sessions-core/src/main/java/com/adyen/checkout/sessions/core/internal/CheckoutSessionInitializer.kt index 820383414d..7d7ee9fb8a 100644 --- a/sessions-core/src/main/java/com/adyen/checkout/sessions/core/internal/CheckoutSessionInitializer.kt +++ b/sessions-core/src/main/java/com/adyen/checkout/sessions/core/internal/CheckoutSessionInitializer.kt @@ -33,7 +33,7 @@ internal class CheckoutSessionInitializer( private val sessionService = SessionService(httpClient) private val sessionRepository = SessionRepository(sessionService, clientKey) - // TODO: Once Backend provides the correct amount in the SessionSetupResponse use that in SessionDetails instead of + // TODO Once Backend provides the correct amount in the SessionSetupResponse use that in SessionDetails instead of // override Amount suspend fun setupSession(overrideAmount: Amount?): CheckoutSessionResult = withContext(coroutineDispatcher) { sessionRepository.setupSession( diff --git a/settings.gradle b/settings.gradle index f263e6f142..d7905d565b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,7 +7,7 @@ pluginManagement { } plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } dependencyResolutionManagement { diff --git a/seven-eleven/build.gradle b/seven-eleven/build.gradle index 2ad81046b2..ba39c6a106 100644 --- a/seven-eleven/build.gradle +++ b/seven-eleven/build.gradle @@ -13,13 +13,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.seveneleven' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/seven-eleven/src/main/java/com/adyen/checkout/seveneleven/SevenElevenConfiguration.kt b/seven-eleven/src/main/java/com/adyen/checkout/seveneleven/SevenElevenConfiguration.kt index 8a29c9112b..a2b1fa7e9d 100644 --- a/seven-eleven/src/main/java/com/adyen/checkout/seveneleven/SevenElevenConfiguration.kt +++ b/seven-eleven/src/main/java/com/adyen/checkout/seveneleven/SevenElevenConfiguration.kt @@ -112,7 +112,7 @@ fun CheckoutConfiguration.sevenEleven( return this } -fun CheckoutConfiguration.getSevenElevenConfiguration(): SevenElevenConfiguration? { +internal fun CheckoutConfiguration.getSevenElevenConfiguration(): SevenElevenConfiguration? { return getConfiguration(PaymentMethodTypes.ECONTEXT_SEVEN_ELEVEN) } diff --git a/test-core/build.gradle b/test-core/build.gradle index 449f5dcf46..0864c0a35f 100644 --- a/test-core/build.gradle +++ b/test-core/build.gradle @@ -15,13 +15,11 @@ apply from: "${rootDir}/config/gradle/codeQuality.gradle" android { namespace 'com.adyen.checkout.test' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/test-core/src/main/java/com/adyen/checkout/test/extensions/TestFlow.kt b/test-core/src/main/java/com/adyen/checkout/test/extensions/TestFlow.kt index 626b27e370..24ea9f77c2 100644 --- a/test-core/src/main/java/com/adyen/checkout/test/extensions/TestFlow.kt +++ b/test-core/src/main/java/com/adyen/checkout/test/extensions/TestFlow.kt @@ -13,6 +13,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.Job import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.launchIn +import kotlinx.coroutines.flow.onCompletion import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.test.TestCoroutineScheduler import kotlinx.coroutines.test.UnconfinedTestDispatcher @@ -35,9 +36,13 @@ class TestFlow internal constructor(flow: Flow, testScheduler: TestCorouti val latestValue: T get() = values.last() + var completionThrowable: Throwable? = null + private set + init { flow .onEach { _values.add(it) } + .onCompletion { completionThrowable = it } .launchIn(this) } } diff --git a/ui-core/build.gradle b/ui-core/build.gradle index 6d3a94fe7f..1349d07031 100644 --- a/ui-core/build.gradle +++ b/ui-core/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.ui.core' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/ui/view/AddressLookupView.kt b/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/ui/view/AddressLookupView.kt index 8a90c56623..6011c1bff6 100644 --- a/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/ui/view/AddressLookupView.kt +++ b/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/ui/view/AddressLookupView.kt @@ -25,6 +25,7 @@ import com.adyen.checkout.ui.core.internal.ui.AddressLookupDelegate import com.adyen.checkout.ui.core.internal.ui.ComponentView import com.adyen.checkout.ui.core.internal.ui.model.AddressLookupState import com.adyen.checkout.ui.core.internal.util.formatStringWithHyperlink +import com.adyen.checkout.ui.core.internal.util.setLocalizedQueryHintFromStyle import com.adyen.checkout.ui.core.internal.util.setLocalizedTextFromStyle import com.adyen.checkout.ui.core.internal.util.showKeyboard import kotlinx.coroutines.CoroutineScope @@ -98,7 +99,10 @@ class AddressLookupView @JvmOverloads constructor( } private fun initLocalizedStrings(localizedContext: Context) { - binding.addressFormInput.initLocalizedContext(localizedContext) + binding.textInputLayoutAddressLookupQuerySearch.setLocalizedQueryHintFromStyle( + styleResId = R.style.AdyenCheckout_AddressLookup_Query, + localizedContext = localizedContext, + ) binding.textViewInitialDisclaimer.setLocalizedTextFromStyle( styleResId = R.style.AdyenCheckout_AddressLookup_InitialDisclaimer_Title, @@ -119,6 +123,18 @@ class AddressLookupView @JvmOverloads constructor( localizedContext = localizedContext, formatHyperLink = true, ) + + binding.buttonManualEntry.setLocalizedTextFromStyle( + styleResId = R.style.AdyenCheckout_AddressLookup_Button_Manual, + localizedContext = localizedContext, + ) + + binding.buttonSubmitAddress.setLocalizedTextFromStyle( + styleResId = R.style.AdyenCheckout_AddressLookup_Button_Submit, + localizedContext = localizedContext, + ) + + binding.addressFormInput.initLocalizedContext(localizedContext) } private fun initAddressLookupQuery() { @@ -169,7 +185,7 @@ class AddressLookupView @JvmOverloads constructor( } private fun initSubmitAddressButton() { - binding.submitAddressButton.setOnClickListener { + binding.buttonSubmitAddress.setOnClickListener { addressLookupDelegate.submitAddress() } } @@ -195,7 +211,7 @@ class AddressLookupView @JvmOverloads constructor( binding.progressBar.isVisible = false binding.buttonManualEntry.isVisible = false binding.divider.isVisible = false - binding.submitAddressButton.isVisible = false + binding.buttonSubmitAddress.isVisible = false binding.textViewManualEntryError.text = localizedContext.getString(R.string.checkout_address_lookup_empty_description, addressLookupState.query) .formatStringWithHyperlink("#") @@ -211,7 +227,7 @@ class AddressLookupView @JvmOverloads constructor( binding.progressBar.isVisible = false binding.buttonManualEntry.isVisible = false binding.divider.isVisible = false - binding.submitAddressButton.isVisible = false + binding.buttonSubmitAddress.isVisible = false } private fun handleLoadingState() { @@ -224,7 +240,7 @@ class AddressLookupView @JvmOverloads constructor( binding.progressBar.isVisible = true binding.buttonManualEntry.isVisible = false binding.divider.isVisible = false - binding.submitAddressButton.isVisible = false + binding.buttonSubmitAddress.isVisible = false } private fun handleFormState(addressLookupState: AddressLookupState.Form) { @@ -237,7 +253,7 @@ class AddressLookupView @JvmOverloads constructor( binding.progressBar.isVisible = false binding.buttonManualEntry.isVisible = false binding.divider.isVisible = false - binding.submitAddressButton.isVisible = true + binding.buttonSubmitAddress.isVisible = true addressLookupDelegate.addressDelegate.updateAddressInputData { if (addressLookupState.selectedAddress == null) { this.resetAll() @@ -257,7 +273,7 @@ class AddressLookupView @JvmOverloads constructor( binding.progressBar.isVisible = false binding.buttonManualEntry.isVisible = true binding.divider.isVisible = true - binding.submitAddressButton.isVisible = false + binding.buttonSubmitAddress.isVisible = false setAddressOptions(addressLookupState.options) } @@ -271,7 +287,7 @@ class AddressLookupView @JvmOverloads constructor( binding.progressBar.isVisible = false binding.buttonManualEntry.isVisible = false binding.divider.isVisible = false - binding.submitAddressButton.isVisible = true + binding.buttonSubmitAddress.isVisible = true highlightValidationErrors() } diff --git a/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/util/ViewExtensions.kt b/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/util/ViewExtensions.kt index 25359a37ec..afc91c705e 100644 --- a/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/util/ViewExtensions.kt +++ b/ui-core/src/main/java/com/adyen/checkout/ui/core/internal/util/ViewExtensions.kt @@ -7,6 +7,7 @@ import android.text.style.URLSpan import android.view.View import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT +import android.widget.SearchView import android.widget.TextView import androidx.annotation.RestrictTo import androidx.annotation.StyleRes @@ -47,6 +48,14 @@ fun TextView.setLocalizedTextFromStyle( typedArray.recycle() } +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) +fun SearchView.setLocalizedQueryHintFromStyle(@StyleRes styleResId: Int, localizedContext: Context) { + val attrs = intArrayOf(android.R.attr.queryHint) + val typedArray = localizedContext.obtainStyledAttributes(styleResId, attrs) + queryHint = typedArray.getString(0) + typedArray.recycle() +} + internal fun String.formatStringWithHyperlink(replacementToken: String = "%#"): CharSequence { // check if the string contains the replacement token twice val counter = this.split(replacementToken).size - 1 diff --git a/ui-core/src/main/res/layout/address_lookup_view.xml b/ui-core/src/main/res/layout/address_lookup_view.xml index f2415d540c..9653a6af54 100644 --- a/ui-core/src/main/res/layout/address_lookup_view.xml +++ b/ui-core/src/main/res/layout/address_lookup_view.xml @@ -105,7 +105,7 @@ tools:visibility="visible" /> diff --git a/ui-core/src/main/res/template/values/strings.xml.tt b/ui-core/src/main/res/template/values/strings.xml.tt index 77ad2b84ea..a36705d017 100644 --- a/ui-core/src/main/res/template/values/strings.xml.tt +++ b/ui-core/src/main/res/template/values/strings.xml.tt @@ -53,6 +53,7 @@ %%address.lookup.search.empty.title.noResults%% %%address.lookup.search.empty.subtitle.noResults%% %%address.enterManually%% + %%address.lookup.submit%% %1$s (%2$s) diff --git a/ui-core/src/main/res/values-ar/strings.xml b/ui-core/src/main/res/values-ar/strings.xml index 63908fa686..29c36247bd 100644 --- a/ui-core/src/main/res/values-ar/strings.xml +++ b/ui-core/src/main/res/values-ar/strings.xml @@ -53,5 +53,6 @@ لم يتم العثور على نتائج لم يتطابق \'%s\' مع أي شيء، حاول مرة أخرى أو استخدم #إدخال العنوان يدويًا# أدخل العنوان يدويًا + استخدم هذا العنوان \ No newline at end of file diff --git a/ui-core/src/main/res/values-cs-rCZ/strings.xml b/ui-core/src/main/res/values-cs-rCZ/strings.xml index 09a8459d97..c38348c57c 100644 --- a/ui-core/src/main/res/values-cs-rCZ/strings.xml +++ b/ui-core/src/main/res/values-cs-rCZ/strings.xml @@ -47,11 +47,12 @@ Provincie nebo teritorium Město (nepovinné) - Vyhledat vaši adresu - Nedaří se vám vyhledat vaši adresu? + Vyhledat svou adresu + Nemůžete najít svou adresu? Vždy můžete #zadat svou adresu ručně# Nebyly nalezeny žádné výsledky „%s“ se s ničím neshoduje, zkuste to znovu nebo použijte #ruční zadání adresy# Zadejte adresu ručně + Použijte tuto adresu \ No newline at end of file diff --git a/ui-core/src/main/res/values-da-rDK/strings.xml b/ui-core/src/main/res/values-da-rDK/strings.xml index b660174f7a..32d5fe0038 100644 --- a/ui-core/src/main/res/values-da-rDK/strings.xml +++ b/ui-core/src/main/res/values-da-rDK/strings.xml @@ -47,11 +47,12 @@ Provins eller territorium (valgfrit) By (valgfrit) - Søg på din adresse - Kan du ikke søge på din adresse? + Søg efter din adresse + Kan du ikke søge efter din adresse? Du kan altid #indtaste din adresse manuelt# Ingen resultater fundet Fandt ikke noget match for \'%s\'. Prøv igen eller #indtast adresse manuelt#. Indtast adresse manuelt + Brug denne adresse \ No newline at end of file diff --git a/ui-core/src/main/res/values-de-rDE/strings.xml b/ui-core/src/main/res/values-de-rDE/strings.xml index 1bf464a966..50cf511ac9 100644 --- a/ui-core/src/main/res/values-de-rDE/strings.xml +++ b/ui-core/src/main/res/values-de-rDE/strings.xml @@ -47,11 +47,12 @@ Provinz oder Territorium (optional) Ort (optional) - Suchen Sie Ihre Adresse - Sie können Ihre Adresse nicht suchen? + Suchen Sie nach Ihrer Adresse + Sie können nicht nach Ihrer Adresse suchen? Sie können Ihre Adresse jederzeit manuell #eingeben# Keine Ergebnisse gefunden \'%s\' stimmt nicht mit irgendetwas überein, versuchen Sie es erneut oder verwenden Sie #manual address entry# Geben Sie die Adresse manuell ein + Diese Adresse verwenden - \ No newline at end of file + diff --git a/ui-core/src/main/res/values-el-rGR/strings.xml b/ui-core/src/main/res/values-el-rGR/strings.xml index 15c478aee2..07a0503a77 100644 --- a/ui-core/src/main/res/values-el-rGR/strings.xml +++ b/ui-core/src/main/res/values-el-rGR/strings.xml @@ -48,10 +48,11 @@ Πόλη / Δήμος (προαιρετικό) Αναζητήστε τη διεύθυνσή σας - Δεν μπορείτε να κάνετε αναζήτηση της διεύθυνσής σας; + Δεν μπορείτε να αναζητήσετε τη διεύθυνσή σας; Μπορείτε πάντα να #εισαγάγετε τη διεύθυνσή σας μη αυτόματα# Δεν βρέθηκαν αποτελέσματα Το \'%s\' δεν ταιριάζει με τίποτα. Προσπαθήστε ξανά ή χρησιμοποιήστε #μη αυτόματη εισαγωγή διεύθυνσης# Εισαγάγετε τη διεύθυνση μη αυτόματα + Χρησιμοποιήστε αυτήν τη διεύθυνση \ No newline at end of file diff --git a/ui-core/src/main/res/values-es-rES/strings.xml b/ui-core/src/main/res/values-es-rES/strings.xml index 5c05259d94..189cbb4d2d 100644 --- a/ui-core/src/main/res/values-es-rES/strings.xml +++ b/ui-core/src/main/res/values-es-rES/strings.xml @@ -53,5 +53,6 @@ No se han encontrado resultados "%s" no ha coincidido con nada, inténtelo de nuevo o #introduzca su dirección manualmente# Introduzca la dirección manualmente + Usar esta dirección \ No newline at end of file diff --git a/ui-core/src/main/res/values-fi-rFI/strings.xml b/ui-core/src/main/res/values-fi-rFI/strings.xml index 6f439a7bde..b336f5b5bc 100644 --- a/ui-core/src/main/res/values-fi-rFI/strings.xml +++ b/ui-core/src/main/res/values-fi-rFI/strings.xml @@ -53,5 +53,6 @@ Tuloksia ei löytynyt \'%s\' ei tuottanut tuloksia. Yritä uudelleen tai käytä #manuaalista osoitteen syöttöä# Syötä osoite manuaalisesti + Käytä tätä osoitetta \ No newline at end of file diff --git a/ui-core/src/main/res/values-fr-rFR/strings.xml b/ui-core/src/main/res/values-fr-rFR/strings.xml index d4453af6aa..6b39c805c3 100644 --- a/ui-core/src/main/res/values-fr-rFR/strings.xml +++ b/ui-core/src/main/res/values-fr-rFR/strings.xml @@ -47,11 +47,12 @@ Province ou territoire (facultatif) Ville (facultatif) - Rechercher votre adresse + Recherchez votre adresse Vous ne pouvez pas rechercher votre adresse ? Vous pouvez toujours #saisir votre adresse manuellement# Aucun résultat trouvé Aucune correspondance pour \'%s\', réessayez ou #saisissez votre adresse manuellement# Saisissez l\'adresse manuellement + Utiliser cette adresse \ No newline at end of file diff --git a/ui-core/src/main/res/values-hr-rHR/strings.xml b/ui-core/src/main/res/values-hr-rHR/strings.xml index 909d3a3e8e..62e0f17962 100644 --- a/ui-core/src/main/res/values-hr-rHR/strings.xml +++ b/ui-core/src/main/res/values-hr-rHR/strings.xml @@ -47,11 +47,12 @@ Pokrajina ili teritorij (neobavezno) Grad (neobavezno) - Pretraživanje vaše adrese - Ne možete pretražiti svoju adresu? + Potraži svoju adresu + Ne možeš potražiti svoju adresu? Uvijek možete #ručno unijeti svoju adresu# Nisu pronađeni rezultati \'%s\' nije se podudarao s ničime, pokušajte ponovno ili upotrijebite #ručni unos adrese# Ručno unesite adresu + Koristi ovu adresu diff --git a/ui-core/src/main/res/values-hu-rHU/strings.xml b/ui-core/src/main/res/values-hu-rHU/strings.xml index e43e78baeb..3af44abe0f 100644 --- a/ui-core/src/main/res/values-hu-rHU/strings.xml +++ b/ui-core/src/main/res/values-hu-rHU/strings.xml @@ -53,5 +53,6 @@ Nincs találat A keresett „%s„ kifejezésre nincs találat, próbálkozzon újra, vagy #írja be manuálisan a címet# Manuálisan írjon be egy címet + Használja ezt a címet \ No newline at end of file diff --git a/ui-core/src/main/res/values-it-rIT/strings.xml b/ui-core/src/main/res/values-it-rIT/strings.xml index d12342c91a..f71fb9fdc0 100644 --- a/ui-core/src/main/res/values-it-rIT/strings.xml +++ b/ui-core/src/main/res/values-it-rIT/strings.xml @@ -53,5 +53,6 @@ Nessun risultato trovato %s non corrisponde a nulla, riprova o usa #inserimento indirizzo manuale# Inserisci l\'indirizzo manualmente + Usa questo indirizzo \ No newline at end of file diff --git a/ui-core/src/main/res/values-ja-rJP/strings.xml b/ui-core/src/main/res/values-ja-rJP/strings.xml index 92badc3037..7183bb2aaa 100644 --- a/ui-core/src/main/res/values-ja-rJP/strings.xml +++ b/ui-core/src/main/res/values-ja-rJP/strings.xml @@ -53,5 +53,6 @@ 結果が見つかりませんでした 「%s」との一致はありませんでした。もう一度試すか、#手動でアドレスを入力#してください 住所を手動で入力してください + この住所を使用する \ No newline at end of file diff --git a/ui-core/src/main/res/values-ko-rKR/strings.xml b/ui-core/src/main/res/values-ko-rKR/strings.xml index d1c1173b00..60d1d4437a 100644 --- a/ui-core/src/main/res/values-ko-rKR/strings.xml +++ b/ui-core/src/main/res/values-ko-rKR/strings.xml @@ -53,5 +53,6 @@ 결과를 찾을 수 없습니다. \'%s\'와(과) 일치하는 항목이 없습니다. 다시 시도하거나 #수동 주소 입력#을 사용하세요. 수동으로 주소 입력 + 이 주소 사용 \ No newline at end of file diff --git a/ui-core/src/main/res/values-nb-rNO/strings.xml b/ui-core/src/main/res/values-nb-rNO/strings.xml index e10a4f070f..ace064b24b 100644 --- a/ui-core/src/main/res/values-nb-rNO/strings.xml +++ b/ui-core/src/main/res/values-nb-rNO/strings.xml @@ -47,11 +47,12 @@ Provins eller territorium (valgfritt) By (valgfritt) - Søk på adressen din - Kan du ikke søke på adressen din? + Søk etter adressen din + Kan du ikke søke etter adressen din? Du kan alltids #skrive inn adressen din manuelt# Fant ingen resultater Fikk ingen treff på «%s». Prøv igjen eller #skriv inn adressen manuelt# Skriv inn adressen manuelt + Bruk denne adressen \ No newline at end of file diff --git a/ui-core/src/main/res/values-nl-rNL/strings.xml b/ui-core/src/main/res/values-nl-rNL/strings.xml index b7e9e9c45f..c9fbb25dec 100644 --- a/ui-core/src/main/res/values-nl-rNL/strings.xml +++ b/ui-core/src/main/res/values-nl-rNL/strings.xml @@ -47,11 +47,12 @@ Provincie of territorium (optioneel) Stad (optioneel) - Zoek uw adres - Werd uw adres niet gevonden? + Zoeken naar uw adres + Kunt u niet zoeken naar uw adres? U kunt #uw adres handmatig invoeren# Geen resultaten gevonden Geen resulaten gevonden voor \'%s\', probeer het opnieuw of gebruik #adres handmatig invoeren# Voer het adres handmatig in + Dit adres gebruiken \ No newline at end of file diff --git a/ui-core/src/main/res/values-pl-rPL/strings.xml b/ui-core/src/main/res/values-pl-rPL/strings.xml index 4d2498491b..05b97cec49 100644 --- a/ui-core/src/main/res/values-pl-rPL/strings.xml +++ b/ui-core/src/main/res/values-pl-rPL/strings.xml @@ -47,11 +47,12 @@ Region lub terytorium (opcjonalnie) Miejscowość (opcjonalnie) - Znajdź swój adres + Wyszukaj swój adres Nie możesz znaleźć swojego adresu? Zawsze możesz #wprowadzić swój adres ręcznie# Nie znaleziono żadnych wyników Nie znaleziono żadnych dopasowań dla \'%s\', spróbuj ponownie lub #wprowadź adres ręcznie# Wprowadź adres ręcznie + Użyj tego adresu \ No newline at end of file diff --git a/ui-core/src/main/res/values-pt-rBR/strings.xml b/ui-core/src/main/res/values-pt-rBR/strings.xml index f02c5e1293..eababec81d 100644 --- a/ui-core/src/main/res/values-pt-rBR/strings.xml +++ b/ui-core/src/main/res/values-pt-rBR/strings.xml @@ -47,11 +47,12 @@ Província ou território (opcional) Cidade (opcional) - Pesquise seu endereço - Não consegue pesquisar seu endereço? + Procure seu endereço + Não consegue encontrar seu endereço? Você pode #inserir seu endereço manualmente# Nenhum resultado encontrado A pesquisa de \'%s\' não obteve resultados. Tente novamente ou use #inserir endereço manualmente# Inserir endereço manualmente + Usar este endereço \ No newline at end of file diff --git a/ui-core/src/main/res/values-pt-rPT/strings.xml b/ui-core/src/main/res/values-pt-rPT/strings.xml index 94ab3600e1..110e10a076 100644 --- a/ui-core/src/main/res/values-pt-rPT/strings.xml +++ b/ui-core/src/main/res/values-pt-rPT/strings.xml @@ -53,5 +53,6 @@ Nenhum resultado encontrado \'%s\' não devolveu resultados, tente novamente ou use #inserção manual do endereço# Introduza o endereço manualmente + Utilize este endereço \ No newline at end of file diff --git a/ui-core/src/main/res/values-ro-rRO/strings.xml b/ui-core/src/main/res/values-ro-rRO/strings.xml index dba0530e42..852b0b2c11 100644 --- a/ui-core/src/main/res/values-ro-rRO/strings.xml +++ b/ui-core/src/main/res/values-ro-rRO/strings.xml @@ -53,5 +53,6 @@ Nu s-au găsit rezultate \'%s\' nu s-a potrivit cu nimic, încercați din nou sau folosiți #completarea manuală a adresei# Introduceți adresa manual + Folosiți această adresă \ No newline at end of file diff --git a/ui-core/src/main/res/values-ru-rRU/strings.xml b/ui-core/src/main/res/values-ru-rRU/strings.xml index 67bd41cad0..2cbda30d55 100644 --- a/ui-core/src/main/res/values-ru-rRU/strings.xml +++ b/ui-core/src/main/res/values-ru-rRU/strings.xml @@ -47,11 +47,12 @@ Область или территория (необязательно) Город (необязательно) - Поиск по адресу - Не можете найти адрес? + Найдите свой адрес + Не удается найти адрес? Можно #ввести адрес вручную# Результаты не найдены Не найдено соответствий «%s». Повторите попытку или используйте #ручной ввод адреса# Ввести адрес вручную + Используйте этот адрес \ No newline at end of file diff --git a/ui-core/src/main/res/values-sk-rSK/strings.xml b/ui-core/src/main/res/values-sk-rSK/strings.xml index 050278a086..c6f80e1df9 100644 --- a/ui-core/src/main/res/values-sk-rSK/strings.xml +++ b/ui-core/src/main/res/values-sk-rSK/strings.xml @@ -53,5 +53,6 @@ Nenašli sa žiadne výsledky \'%s\' sa s ničím nezhoduje, skúste to znova alebo použite #ručné zadanie adresy# Manuálne zadajte adresu + Použite túto adresu \ No newline at end of file diff --git a/ui-core/src/main/res/values-sl-rSI/strings.xml b/ui-core/src/main/res/values-sl-rSI/strings.xml index 08e70eab2b..9700bb2e5c 100644 --- a/ui-core/src/main/res/values-sl-rSI/strings.xml +++ b/ui-core/src/main/res/values-sl-rSI/strings.xml @@ -48,10 +48,11 @@ Mesto (neobvezno) Poiščite svoj naslov - Ne morete iskati svojega naslova? + Ne morete poiskati svojega naslova? Vedno lahko #ročno vnesete svoj naslov# Nobenega rezultata ni bilo mogoče najti »%s« se ni ujemalo z ničemer, poskusite znova ali uporabite #ročni vnos naslova# Naslov vnesite ročno + Uporabite ta naslov \ No newline at end of file diff --git a/ui-core/src/main/res/values-sv-rSE/strings.xml b/ui-core/src/main/res/values-sv-rSE/strings.xml index a4f0c72998..5e64df2f3b 100644 --- a/ui-core/src/main/res/values-sv-rSE/strings.xml +++ b/ui-core/src/main/res/values-sv-rSE/strings.xml @@ -47,11 +47,12 @@ Provins eller territorium (valfritt) Ort (valfritt) - Sök upp din adress + Sök efter din adress Kan du inte söka efter din adress? Du kan alltid #ange din adress manuellt# Inga resultat hittades Det finns inga matchningar för ”%s”. Försök igen eller använd #manuell adressinmatning# Ange adress manuellt + Använd denna adress \ No newline at end of file diff --git a/ui-core/src/main/res/values-zh-rCN/strings.xml b/ui-core/src/main/res/values-zh-rCN/strings.xml index 75a804d24e..70be5b9068 100644 --- a/ui-core/src/main/res/values-zh-rCN/strings.xml +++ b/ui-core/src/main/res/values-zh-rCN/strings.xml @@ -53,5 +53,6 @@ 未找到任何结果 “%s”无匹配内容,请重试或者使用#手动地址条目# 手动输入地址 + 使用此地址 \ No newline at end of file diff --git a/ui-core/src/main/res/values-zh-rTW/strings.xml b/ui-core/src/main/res/values-zh-rTW/strings.xml index 6ded3ae838..1aa118699b 100644 --- a/ui-core/src/main/res/values-zh-rTW/strings.xml +++ b/ui-core/src/main/res/values-zh-rTW/strings.xml @@ -53,5 +53,6 @@ 找不到任何結果 「%s」不符合任何搜尋內容,請再試一次或#手動輸入地址# 手動輸入地址 + 使用此地址 \ No newline at end of file diff --git a/ui-core/src/main/res/values/strings.xml b/ui-core/src/main/res/values/strings.xml index 1e5fc2976b..ebd8d3f7b0 100644 --- a/ui-core/src/main/res/values/strings.xml +++ b/ui-core/src/main/res/values/strings.xml @@ -47,12 +47,13 @@ Province or Territory (optional) City / Town (optional) - Search your address - Can\'t search your address? + Search for your address + Can\'t search for your address? You can always #enter your address manually# No results found \'%s\' did not match with anything, try again or use #manual address entry# Enter address manually + Use this address %1$s (%2$s) diff --git a/ui-core/src/main/res/values/styles.xml b/ui-core/src/main/res/values/styles.xml index 2983b1e897..d7e26847b5 100644 --- a/ui-core/src/main/res/values/styles.xml +++ b/ui-core/src/main/res/values/styles.xml @@ -326,7 +326,6 @@ @string/checkout_address_form_billing_address_title - diff --git a/upi/build.gradle b/upi/build.gradle index 380cbcc773..e579e62cb1 100644 --- a/upi/build.gradle +++ b/upi/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.upi' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/upi/src/main/java/com/adyen/checkout/upi/UPIConfiguration.kt b/upi/src/main/java/com/adyen/checkout/upi/UPIConfiguration.kt index 47bf208a8f..92868e3f96 100644 --- a/upi/src/main/java/com/adyen/checkout/upi/UPIConfiguration.kt +++ b/upi/src/main/java/com/adyen/checkout/upi/UPIConfiguration.kt @@ -132,7 +132,7 @@ fun CheckoutConfiguration.upi( return this } -fun CheckoutConfiguration.getUPIConfiguration(): UPIConfiguration? { +internal fun CheckoutConfiguration.getUPIConfiguration(): UPIConfiguration? { return UPIComponent.PAYMENT_METHOD_TYPES.firstNotNullOfOrNull { key -> getConfiguration(key) } diff --git a/voucher/build.gradle b/voucher/build.gradle index 6e689999ae..f61bd7005d 100644 --- a/voucher/build.gradle +++ b/voucher/build.gradle @@ -21,13 +21,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.voucher' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" diff --git a/voucher/src/main/java/com/adyen/checkout/voucher/VoucherConfiguration.kt b/voucher/src/main/java/com/adyen/checkout/voucher/VoucherConfiguration.kt index 29171c8c06..762cc78f12 100644 --- a/voucher/src/main/java/com/adyen/checkout/voucher/VoucherConfiguration.kt +++ b/voucher/src/main/java/com/adyen/checkout/voucher/VoucherConfiguration.kt @@ -106,7 +106,7 @@ fun CheckoutConfiguration.voucher( return this } -fun CheckoutConfiguration.getVoucherConfiguration(): VoucherConfiguration? { +internal fun CheckoutConfiguration.getVoucherConfiguration(): VoucherConfiguration? { return getActionConfiguration(VoucherConfiguration::class.java) } diff --git a/voucher/src/main/java/com/adyen/checkout/voucher/internal/ui/DefaultVoucherDelegate.kt b/voucher/src/main/java/com/adyen/checkout/voucher/internal/ui/DefaultVoucherDelegate.kt index c3d95e8a1e..05ce6555e0 100644 --- a/voucher/src/main/java/com/adyen/checkout/voucher/internal/ui/DefaultVoucherDelegate.kt +++ b/voucher/src/main/java/com/adyen/checkout/voucher/internal/ui/DefaultVoucherDelegate.kt @@ -113,7 +113,7 @@ internal class DefaultVoucherDelegate( action: VoucherAction, config: VoucherPaymentMethodConfig ) { - // TODO: remove action.url when it's fixed from backend side + // TODO remove action.url when it's fixed from backend side val downloadUrl = action.downloadUrl ?: action.url val storeAction = downloadUrl?.let { url -> VoucherStoreAction.DownloadPdf(url) diff --git a/wechatpay/build.gradle b/wechatpay/build.gradle index 09b0a7ab0a..a35ff51ca2 100644 --- a/wechatpay/build.gradle +++ b/wechatpay/build.gradle @@ -20,13 +20,11 @@ apply from: "${rootDir}/config/gradle/sharedTasks.gradle" android { namespace 'com.adyen.checkout.wechatpay' - compileSdkVersion compile_sdk_version + compileSdk compile_sdk_version defaultConfig { - minSdkVersion min_sdk_version - targetSdkVersion target_sdk_version - versionCode version_code - versionName version_name + minSdk min_sdk_version + targetSdk target_sdk_version testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles "consumer-rules.pro" diff --git a/wechatpay/src/main/java/com/adyen/checkout/wechatpay/WeChatPayActionConfiguration.kt b/wechatpay/src/main/java/com/adyen/checkout/wechatpay/WeChatPayActionConfiguration.kt index d570b681e1..487085272a 100644 --- a/wechatpay/src/main/java/com/adyen/checkout/wechatpay/WeChatPayActionConfiguration.kt +++ b/wechatpay/src/main/java/com/adyen/checkout/wechatpay/WeChatPayActionConfiguration.kt @@ -105,7 +105,7 @@ fun CheckoutConfiguration.weChatPayAction( return this } -fun CheckoutConfiguration.getWeChatPayActionConfiguration(): WeChatPayActionConfiguration? { +internal fun CheckoutConfiguration.getWeChatPayActionConfiguration(): WeChatPayActionConfiguration? { return getActionConfiguration(WeChatPayActionConfiguration::class.java) }