Skip to content

Commit

Permalink
Merge pull request #1691 from Adyen/feature/upi_intent_show_error_if_…
Browse files Browse the repository at this point in the history
…no_app_is_selected

UPI - Show disclaimer when Continue is pressed without a selection
  • Loading branch information
araratthehero authored Jul 15, 2024
2 parents 48ffa52 + d5784b5 commit abb49d0
Show file tree
Hide file tree
Showing 69 changed files with 174 additions and 284 deletions.
19 changes: 2 additions & 17 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,5 @@
[//]: # (## Deprecated)
[//]: # ( - Configurations public constructor are deprecated, please use each Configuration's builder to make a Configuration object)

## New
- For Google Pay on Advanced flow, `onSubmit` now returns`threeDS2SdkVersion` in the `paymentMethod` object that you must pass in your [`/payments`](https://docs.adyen.com/api-explorer/Checkout/71/post/payments) request to correctly trigger the 3D Secure 2 flow.

## Fixed
- On Android API versions 21 to 25, the `NoSuchMethodError` no longer occurs during the 3D Secure 2 challenge flow.
- When [using R8 to shrink your code](https://developer.android.com/build/shrink-code), `CIRCULAR REFERENCE: com.android.tools.r8.utils.b: Missing class...` errors no longer occur.

## Changed
- Dependency versions:
| Name | Version |
|--------------------------------------------------------------------------------------------------------------|-------------------------------|
| [Adyen 3DS2](https://github.com/Adyen/adyen-3ds2-android/releases/tag/2.2.19) | **2.2.19** |
| [Kotlin](https://github.com/JetBrains/kotlin/releases/tag/v1.9.24) | **1.9.24** |
| [Android Gradle plugin](https://developer.android.com/build/releases/gradle-plugin) | **8.4.1** |
| [AndroidX Compose Compiler](https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.5.14) | **1.5.14** |
| [Kotlin coroutines](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.8.1) | **1.8.1** |
| [AndroidX Fragment](https://developer.android.com/jetpack/androidx/releases/fragment#1.7.1) | **1.7.1** |
## Improved
- For UPI Intent an error message will be shown when "Continue" button is pressed without selecting any UPI option.
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ internal class DefaultACHDirectDebitDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

companion object {
private const val ENCRYPTION_KEY_FOR_BANK_ACCOUNT_NUMBER = "bankAccountNumber"
private const val ENCRYPTION_KEY_FOR_BANK_LOCATION_ID = "bankLocationId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,15 +605,6 @@ internal class DefaultACHDirectDebitDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ internal class DefaultBacsDirectDebitDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,15 +477,6 @@ internal class DefaultBacsDirectDebitDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ internal class DefaultBlikDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ internal class StoredBlikDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,6 @@ internal class DefaultBlikDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ class StoredBlikDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ internal class DefaultBoletoDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun onCleared() {
removeObserver()
analyticsManager.clear(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,6 @@ internal class DefaultBoletoDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,6 @@ class DefaultCardDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setOnBinValueListener(listener: ((binValue: String) -> Unit)?) {
onBinValueListener = listener
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ internal class StoredCardDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun updateAddressInputData(update: AddressInputModel.() -> Unit) {
// no ops
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1006,15 +1006,6 @@ internal class DefaultCardDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,6 @@ internal class StoredCardDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ constructor(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

internal fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,6 @@ internal class DefaultCashAppPayDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ internal class DefaultEContextDelegate<
return isConfirmationRequired() && componentParams.isSubmitButtonVisible
}

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,6 @@ internal class DefaultEContextDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ internal class DefaultGiftCardDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,6 @@ internal class DefaultGiftCardDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ internal class DefaultIssuerListDelegate<

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,6 @@ internal class DefaultIssuerListDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ internal class DefaultMBWayDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,6 @@ internal class DefaultMBWayDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ internal class DefaultOnlineBankingDelegate<

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,6 @@ internal class DefaultOnlineBankingDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ internal class DefaultSepaDelegate(

override fun shouldShowSubmitButton(): Boolean = isConfirmationRequired() && componentParams.isSubmitButtonVisible

override fun shouldEnableSubmitButton(): Boolean = true

override fun setInteractionBlocked(isInteractionBlocked: Boolean) {
submitHandler.setInteractionBlocked(isInteractionBlocked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,6 @@ internal class DefaultSepaDelegateTest(
}
}

@Nested
inner class SubmitButtonEnableTest {

@Test
fun `when shouldEnableSubmitButton is called, then true is returned`() {
assertTrue(delegate.shouldEnableSubmitButton())
}
}

@Nested
inner class SubmitHandlerTest {

Expand Down
4 changes: 0 additions & 4 deletions ui-core/api/ui-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ public final class com/adyen/checkout/ui/core/internal/ui/PaymentComponentUIEven
public static final field INSTANCE Lcom/adyen/checkout/ui/core/internal/ui/PaymentComponentUIEvent$InvalidUI;
}

public final class com/adyen/checkout/ui/core/internal/ui/PaymentComponentUIEvent$StateUpdated : com/adyen/checkout/ui/core/internal/ui/PaymentComponentUIEvent {
public static final field INSTANCE Lcom/adyen/checkout/ui/core/internal/ui/PaymentComponentUIEvent$StateUpdated;
}

public final class com/adyen/checkout/ui/core/internal/ui/PaymentComponentUIState$Blocked : com/adyen/checkout/ui/core/internal/ui/PaymentComponentUIState {
public static final field INSTANCE Lcom/adyen/checkout/ui/core/internal/ui/PaymentComponentUIState$Blocked;
}
Expand Down
Loading

0 comments on commit abb49d0

Please sign in to comment.