Skip to content

Commit

Permalink
Merge pull request #1384 from Adyen/develop
Browse files Browse the repository at this point in the history
Release 5.0.1
  • Loading branch information
OscarSpruit authored Nov 10, 2023
2 parents 4820936 + 0a4fab8 commit 7722943
Show file tree
Hide file tree
Showing 52 changed files with 153 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.adyen3ds2.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.ui.core.internal.ui.ComponentView
import com.adyen.checkout.ui.core.internal.ui.ComponentViewType
import com.adyen.checkout.ui.core.internal.ui.ViewProvider
Expand All @@ -20,10 +19,8 @@ internal object Adyen3DS2ViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView = when (viewType) {
Adyen3DS2ComponentViewType -> PaymentInProgressView(context, attrs, defStyleAttr)
Adyen3DS2ComponentViewType -> PaymentInProgressView(context)
else -> error("Unsupported view type")
}
}
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.0"
implementation "com.adyen.checkout:drop-in-compose:5.0.1"
```
For the Credit Card component:
```groovy
implementation "com.adyen.checkout:card:5.0.0"
implementation "com.adyen.checkout:components-compose:5.0.0"
implementation "com.adyen.checkout:card:5.0.1"
implementation "com.adyen.checkout:components-compose:5.0.1"
```

### Without Jetpack Compose

For Drop-in:
```groovy
implementation "com.adyen.checkout:drop-in:5.0.0"
implementation "com.adyen.checkout:drop-in:5.0.1"
```
For the Credit Card component:
```groovy
implementation "com.adyen.checkout:card:5.0.0"
implementation "com.adyen.checkout:card:5.0.1"
```

The library is available on [Maven Central][mavenRepo].
Expand Down Expand Up @@ -97,7 +97,7 @@ This repository is available under the [MIT license](LICENSE).
[shield.license.image]: https://img.shields.io/github/license/Adyen/adyen-android
[shield.license.link]: LICENSE
[docs.android]: https://docs.adyen.com/online-payments/build-your-integration/?platform=Android
[header.preview]: config/docs/dropin-android.jpg
[header.preview]: https://github.com/Adyen/adyen-android/assets/9079915/e6e18a07-b30f-41f0-b7ef-701b20e2e339
[adyen.testAccount]: https://www.adyen.com/signup
[docs.apiKey]: https://docs.adyen.com/development-resources/how-to-get-the-api-key
[docs.clientKey]: https://docs.adyen.com/development-resources/client-side-authentication#get-your-client-key
Expand Down
18 changes: 5 additions & 13 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,14 @@
[//]: # ( # Deprecated)
[//]: # ( - Configurations public constructor are deprecated, please use each Configuration's builder to make a Configuration object)

For guidance on integrating with this version, have a look at the [integration guide](https://docs.adyen.com/online-payments/build-your-integration/?platform=Android).

If your integration uses Android v4.13.3 and earlier, and you're upgrading it to use v5.0.0, you can follow the [migration guide](https://docs.adyen.com/online-payments/build-your-integration/migrate-to-android-5-0-0/).

These are the changes between the beta and stable release. For the full release notes that include all the changes from v4.13.3, see the [release notes in our Docs](https://docs.adyen.com/online-payments/release-notes/?version=5.0.0&integration_type=android).

## Breaking changes
- `Amount.EMPTY` is removed. Make sure you pass amounts with a valid value and currency.

## Fixed
- `@RestrictTo` annotations no longer cause false errors with Android Studio Hedgehog (Beta).
- The Drop-in bottom sheet will no longer shift position on the screen when launching some flows like redirect and 3D Secure 2.
- `@RestrictTo` annotations no longer cause false errors with Android Studio and Lint.
- Using the layout inspector or having view attribute inspection enabled in the developer options no longer causes a crash when viewing a payment method.
- Implementing the `:action` module no longer gives a duplicate class error caused by a duplicate namespace.
- For Drop-in, dismissing the gift card payment method no longer prevents further interaction.

## Changed
- Dependency versions:
| Name | Version |
|--------------------------------------------------------------------------------------------------------|-------------------------------|
| [Google Pay](https://developers.google.com/pay/api/android/support/release-notes#sept-14) | **19.2.1** |
| [AndroidX Compose BoM](https://developer.android.com/jetpack/compose/bom/bom-mapping) | **2023.09.00** |
| [AndroidX Compose BoM](https://developer.android.com/jetpack/compose/bom/bom-mapping) | **2023.09.01** |
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.ach.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.ach.internal.ui.view.ACHDirectDebitView
import com.adyen.checkout.ui.core.internal.ui.AmountButtonComponentViewType
import com.adyen.checkout.ui.core.internal.ui.ButtonComponentViewType
Expand All @@ -21,11 +20,9 @@ internal object ACHDirectDebitViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView {
return when (viewType) {
ACHDirectDebitComponentViewType -> ACHDirectDebitView(context, attrs, defStyleAttr)
ACHDirectDebitComponentViewType -> ACHDirectDebitView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
2 changes: 1 addition & 1 deletion action-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ext.mavenArtifactDescription = "Adyen Checkout Action Core module."
apply from: "${rootDir}/config/gradle/sharedTasks.gradle"

android {
namespace 'com.adyen.checkout.action'
namespace 'com.adyen.checkout.action.core'
compileSdkVersion compile_sdk_version

defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ package com.adyen.checkout.action.core.internal

import android.app.Activity
import android.content.Intent
import androidx.annotation.RestrictTo
import com.adyen.checkout.components.core.action.Action

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface ActionHandlingComponent {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.await.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.await.internal.ui.view.AwaitView
import com.adyen.checkout.ui.core.internal.ui.ComponentView
import com.adyen.checkout.ui.core.internal.ui.ComponentViewType
Expand All @@ -20,11 +19,9 @@ internal object AwaitViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView {
return when (viewType) {
AwaitComponentViewType -> AwaitView(context, attrs, defStyleAttr)
AwaitComponentViewType -> AwaitView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.bacs.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.bacs.R
import com.adyen.checkout.bacs.internal.ui.view.BacsDirectDebitConfirmationView
import com.adyen.checkout.bacs.internal.ui.view.BacsDirectDebitInputView
Expand All @@ -22,12 +21,10 @@ internal object BacsDirectDebitViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView {
return when (viewType) {
BacsComponentViewType.INPUT -> BacsDirectDebitInputView(context, attrs, defStyleAttr)
BacsComponentViewType.CONFIRMATION -> BacsDirectDebitConfirmationView(context, attrs, defStyleAttr)
BacsComponentViewType.INPUT -> BacsDirectDebitInputView(context)
BacsComponentViewType.CONFIRMATION -> BacsDirectDebitConfirmationView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.bcmc.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.bcmc.internal.ui.view.BcmcView
import com.adyen.checkout.ui.core.internal.ui.AmountButtonComponentViewType
import com.adyen.checkout.ui.core.internal.ui.ButtonComponentViewType
Expand All @@ -22,10 +21,8 @@ internal object BcmcViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView = when (viewType) {
BcmcComponentViewType -> BcmcView(context, attrs, defStyleAttr)
BcmcComponentViewType -> BcmcView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.blik.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.blik.internal.ui.view.BlikView
import com.adyen.checkout.ui.core.internal.ui.AmountButtonComponentViewType
import com.adyen.checkout.ui.core.internal.ui.ButtonComponentViewType
Expand All @@ -21,11 +20,9 @@ internal object BlikViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView {
return when (viewType) {
BlikComponentViewType -> BlikView(context, attrs, defStyleAttr)
BlikComponentViewType -> BlikView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.boleto.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.boleto.R
import com.adyen.checkout.boleto.internal.ui.view.BoletoView
import com.adyen.checkout.ui.core.internal.ui.ButtonComponentViewType
Expand All @@ -21,10 +20,8 @@ internal object BoletoViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView = when (viewType) {
BoletoComponentViewType -> BoletoView(context, attrs, defStyleAttr)
BoletoComponentViewType -> BoletoView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.card.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.card.internal.ui.view.CardView
import com.adyen.checkout.card.internal.ui.view.StoredCardView
import com.adyen.checkout.ui.core.internal.ui.AmountButtonComponentViewType
Expand All @@ -23,12 +22,10 @@ internal object CardViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView {
return when (viewType) {
CardComponentViewType.DefaultCardView -> CardView(context, attrs, defStyleAttr)
CardComponentViewType.StoredCardView -> StoredCardView(context, attrs, defStyleAttr)
CardComponentViewType.DefaultCardView -> CardView(context)
CardComponentViewType.StoredCardView -> StoredCardView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.cashapppay.internal.ui

import android.content.Context
import android.util.AttributeSet
import com.adyen.checkout.cashapppay.internal.ui.view.CashAppPayButtonView
import com.adyen.checkout.cashapppay.internal.ui.view.CashAppPayView
import com.adyen.checkout.cashapppay.internal.ui.view.CashAppPayWaitingView
Expand All @@ -25,18 +24,16 @@ internal object CashAppPayViewProvider : ViewProvider {
override fun getView(
viewType: ComponentViewType,
context: Context,
attrs: AttributeSet?,
defStyleAttr: Int
): ComponentView = when (viewType) {
CashAppPayComponentViewType -> CashAppPayView(context, attrs, defStyleAttr)
PaymentInProgressViewType -> CashAppPayWaitingView(context, attrs, defStyleAttr)
CashAppPayComponentViewType -> CashAppPayView(context)
PaymentInProgressViewType -> CashAppPayWaitingView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}

internal class CashAppPayButtonViewProvider : ButtonViewProvider {
override fun getButton(context: Context, attrs: AttributeSet?, defStyleAttr: Int): PayButton =
CashAppPayButtonView(context, attrs, defStyleAttr)
override fun getButton(context: Context): PayButton =
CashAppPayButtonView(context)
}

internal object CashAppPayComponentViewType : ButtonComponentViewType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
*/
package com.adyen.checkout.components.core

import androidx.annotation.RestrictTo

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface ComponentAvailableCallback {
fun onAvailabilityResult(isAvailable: Boolean, paymentMethod: PaymentMethod)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package com.adyen.checkout.components.core.internal

import android.app.Activity
import androidx.annotation.RestrictTo
import com.adyen.checkout.components.core.ActionComponentData
import com.adyen.checkout.components.core.action.Action

Expand All @@ -18,7 +17,6 @@ import com.adyen.checkout.components.core.action.Action
* If an [ActionComponentData] is emitted from this component, it should be sent back through the /payments/details API
* call.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface ActionComponent : Component {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ package com.adyen.checkout.components.core.internal

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 {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@

package com.adyen.checkout.components.core.internal

import androidx.annotation.RestrictTo

/**
* A component that requires a button to be clicked so that it can be submitted. This button might be visible during all
* or part of the payment flow.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface ButtonComponent {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.adyen.checkout.components.core.internal

import androidx.annotation.RestrictTo

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface ButtonConfigurationBuilder {

fun setSubmitButtonVisible(isSubmitButtonVisible: Boolean): ButtonConfigurationBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ package com.adyen.checkout.components.core.internal

import android.app.Activity
import android.content.Intent
import androidx.annotation.RestrictTo

/**
* A component that expects to receive and handle an external result in the form of an [Intent].
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface IntentHandlingComponent : ResultHandlingComponent {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
package com.adyen.checkout.components.core.internal

import androidx.annotation.RestrictTo
import com.adyen.checkout.components.core.PaymentComponentState
import com.adyen.checkout.components.core.paymentmethod.PaymentMethodDetails

Expand All @@ -20,7 +19,6 @@ import com.adyen.checkout.components.core.paymentmethod.PaymentMethodDetails
*
* Can be attached to [AdyenComponentView] to present a view to the user.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface PaymentComponent : Component {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package com.adyen.checkout.components.core.internal

import android.app.Application
import androidx.annotation.RestrictTo
import com.adyen.checkout.components.core.ComponentAvailableCallback
import com.adyen.checkout.components.core.PaymentMethod

Expand All @@ -18,7 +17,6 @@ import com.adyen.checkout.components.core.PaymentMethod
* @param ConfigurationT The Configuration for the Component corresponding to this payment method. Simply use
* [Configuration] if not applicable.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
interface PaymentMethodAvailabilityCheck<ConfigurationT : Configuration> {
fun isAvailable(
applicationContext: Application,
Expand Down
Loading

0 comments on commit 7722943

Please sign in to comment.