From b8da9e62d7797b6c729e4e152c3ee040b73a7227 Mon Sep 17 00:00:00 2001 From: Oscar Spruit Date: Fri, 14 Apr 2023 11:56:02 +0200 Subject: [PATCH 1/2] Prepare release 4.11.0 --- README.md | 4 ++-- RELEASE_NOTES.md | 29 +++++++---------------------- build.gradle | 2 +- example-app/build.gradle | 2 +- 4 files changed, 11 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1407176547..776ca40f96 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ If you are upgrading from 3.x.x to a current release, check out our [migration g Import the Component module for the Payment Method you want to use by adding it to your `build.gradle` file. For example, for the Drop-in solution you should add: ```groovy -implementation "com.adyen.checkout:drop-in:4.10.0" +implementation "com.adyen.checkout:drop-in:4.11.0" ``` For a Credit Card component you should add: ```groovy -implementation "com.adyen.checkout:card:4.10.0" +implementation "com.adyen.checkout:card:4.11.0" ``` ### Client Key diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7a7782f90d..a980e81570 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -9,30 +9,15 @@ [//]: # ( - Configurations public constructor are deprecated, please use each Configuration's builder to make a Configuration object) ## New -* The `CardComponentState.binValue` now reports 8 digit bins in case of card numbers with 16 or more digits. -* The new `CardBrand` class can be used to define unknown card brands. This can be used along with `CardType`. -* When adding new card brands through `CardConfiguration`, you can now use the new `CardBrand`to add brands that are not already defined in `CardType`. - For example: +* For BLIK, one-click is now supported. +* For 3D Secure 2, the `threeDSRequestorAppURL` can now be overridden from the configuration so that you can now use the [Android App Link](https://developer.android.com/studio/write/app-link-indexing) format (HTTP). ```kotlin -CardConfiguration.Builder([SHOPPER_LOCALE], [ENVIRONMENT], [CLIENT_KEY]) -.setSupportedCardTypes(CardBrand(txVariant = "[CARD_BRAND1]"), CardBrand(txVariant = "[CARD_BRAND2]")) -.build() +Adyen3DSConfiguration.Builder(locale, environment, clientKey) + .setThreeDSRequestorURL("https://{your app.com}/adyen3ds2") + .build() ``` - -## Changed -* Upgraded the 3D Secure 2 SDK version to v2.2.11. -* Upgraded `compileSdkVersion` and `targetSdkVersion` to 32. -* Upgraded Kotlin version to 1.6.21. -* Upgraded Kotlin coroutines version to 1.6.1. -* Upgraded Fragment version to 1.5.5. -* Upgraded AppCompat version to 1.5.1. +⚠️Because of recent updates to the 3D Secure protocol, we strongly recommend that you provide the threeDSRequestorAppURL parameter as an Android App Link instead of custom link. This requires your app to handle the provided Android App Link. More details on how to handle Android App Link can be found on docs [page](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/3d-secure/native-3ds2/android-sdk-integration#handling-android-app-links). ## Fixed -* For cards, you can now add unknown card types that aren't defined in `CardType`. Previously, - `CardType.UNKNOWN` was not working correctly. -* There is no longer a conflict with the 3D Secure 2 SDK that causes a runtime exception. This fixes the [known issue in v4.9.0.](https://github.com/Adyen/adyen-android/releases/tag/4.9.0) - -## Deprecated -* The `CardType.UNKNOWN` property. Use `CardBrand(txVariant = "[CARD_BRAND]")` instead. -* The `CardType.setTxVariant()` method. No longer needed as it was used with `CardType.UNKNOWN`. +* For BCMC, errors are now correctly highlighted. diff --git a/build.gradle b/build.gradle index e55665e98b..24141d969f 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,7 @@ allprojects { // just for example app, don't need to increment ext.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). - ext.version_name = "4.10.0" + ext.version_name = "4.11.0" // Code quality ext.ktlint_version = '0.40.0' diff --git a/example-app/build.gradle b/example-app/build.gradle index f0ee77779a..956cac5def 100644 --- a/example-app/build.gradle +++ b/example-app/build.gradle @@ -72,7 +72,7 @@ android { dependencies { // Checkout implementation project(':drop-in') -// implementation "com.adyen.checkout:drop-in:4.10.0" +// implementation "com.adyen.checkout:drop-in:4.11.0" // Dependencies implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinx_version" From a8a2c244ae748016f033a790e58cae8d44ea8840 Mon Sep 17 00:00:00 2001 From: Oscar Spruit Date: Fri, 14 Apr 2023 14:12:49 +0200 Subject: [PATCH 2/2] Restrict access on some internal classes --- .../main/java/com/adyen/checkout/core/api/ConnectionTask.java | 2 ++ .../java/com/adyen/checkout/components/ComponentProvider.java | 3 +++ .../com/adyen/checkout/components/api/LogoConnectionTask.kt | 2 ++ .../components/base/ActivityResultHandlingComponent.kt | 2 ++ .../checkout/dropin/ui/base/DropInBottomSheetDialogFragment.kt | 2 ++ 5 files changed, 11 insertions(+) diff --git a/checkout-core/src/main/java/com/adyen/checkout/core/api/ConnectionTask.java b/checkout-core/src/main/java/com/adyen/checkout/core/api/ConnectionTask.java index 9f79798e49..4c9f751cc4 100644 --- a/checkout-core/src/main/java/com/adyen/checkout/core/api/ConnectionTask.java +++ b/checkout-core/src/main/java/com/adyen/checkout/core/api/ConnectionTask.java @@ -10,6 +10,7 @@ import androidx.annotation.CallSuper; import androidx.annotation.NonNull; +import androidx.annotation.RestrictTo; import com.adyen.checkout.core.log.LogUtil; import com.adyen.checkout.core.log.Logger; @@ -24,6 +25,7 @@ * * @param The type returned by the {@link Connection} */ +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public abstract class ConnectionTask extends FutureTask { private static final String TAG = LogUtil.getTag(); diff --git a/components-core/src/main/java/com/adyen/checkout/components/ComponentProvider.java b/components-core/src/main/java/com/adyen/checkout/components/ComponentProvider.java index a263dfa30c..5c0e357b1c 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/ComponentProvider.java +++ b/components-core/src/main/java/com/adyen/checkout/components/ComponentProvider.java @@ -8,9 +8,12 @@ package com.adyen.checkout.components; +import androidx.annotation.RestrictTo; + /** * This provider should be used to get an instance of a {@link Component} that is bound your lifecycle. */ +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public interface ComponentProvider { // Maker interface } diff --git a/components-core/src/main/java/com/adyen/checkout/components/api/LogoConnectionTask.kt b/components-core/src/main/java/com/adyen/checkout/components/api/LogoConnectionTask.kt index 692fe52321..e6e7eca1f6 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/api/LogoConnectionTask.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/api/LogoConnectionTask.kt @@ -8,6 +8,7 @@ package com.adyen.checkout.components.api import android.graphics.drawable.BitmapDrawable +import androidx.annotation.RestrictTo import com.adyen.checkout.core.api.ConnectionTask import com.adyen.checkout.core.api.ThreadManager import com.adyen.checkout.core.log.LogUtil @@ -19,6 +20,7 @@ import java.util.concurrent.TimeoutException /** * Task that wraps a Connection to get a Logo. */ +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) class LogoConnectionTask( private val logoApi: LogoApi, val logoUrl: String, diff --git a/components-core/src/main/java/com/adyen/checkout/components/base/ActivityResultHandlingComponent.kt b/components-core/src/main/java/com/adyen/checkout/components/base/ActivityResultHandlingComponent.kt index 110c78274b..6447d97037 100644 --- a/components-core/src/main/java/com/adyen/checkout/components/base/ActivityResultHandlingComponent.kt +++ b/components-core/src/main/java/com/adyen/checkout/components/base/ActivityResultHandlingComponent.kt @@ -10,10 +10,12 @@ package com.adyen.checkout.components.base import android.app.Activity import android.content.Intent +import androidx.annotation.RestrictTo /** * A component that expects to receive and handle an activity result. */ +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) interface ActivityResultHandlingComponent : ResultHandlingComponent { /** diff --git a/drop-in/src/main/java/com/adyen/checkout/dropin/ui/base/DropInBottomSheetDialogFragment.kt b/drop-in/src/main/java/com/adyen/checkout/dropin/ui/base/DropInBottomSheetDialogFragment.kt index 56a8641627..b7d09a0259 100644 --- a/drop-in/src/main/java/com/adyen/checkout/dropin/ui/base/DropInBottomSheetDialogFragment.kt +++ b/drop-in/src/main/java/com/adyen/checkout/dropin/ui/base/DropInBottomSheetDialogFragment.kt @@ -13,6 +13,7 @@ import android.content.Context import android.os.Bundle import android.view.KeyEvent import android.widget.FrameLayout +import androidx.annotation.RestrictTo import androidx.fragment.app.activityViewModels import com.adyen.checkout.components.ActionComponentData import com.adyen.checkout.components.PaymentComponentState @@ -30,6 +31,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment private val TAG = LogUtil.getTag() +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) abstract class DropInBottomSheetDialogFragment : BottomSheetDialogFragment() { lateinit var protocol: Protocol