Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.0.0-beta01 #1334

Merged
merged 132 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
d07c398
Merge pull request #1266 from Adyen/main
jreij Jul 18, 2023
7bad70c
Use java 17 with publish docs workflow
jreij Jul 18, 2023
7e7e543
Merge pull request #1267 from Adyen/fix/publish_kdocs_action
jreij Jul 18, 2023
f98f958
Add safe check for components in ComponentParsingProvider
jreij Jul 11, 2023
d7e7e77
Add safe checks for component usages in other places in drop-in
jreij Jul 11, 2023
abfa200
Do not use string resources from component modules inside drop-in
jreij Jul 19, 2023
4422f15
Minor fix: use correct RETURN_URL_EXTRA variable
jreij Jul 19, 2023
a877f46
Minor fix: use blik and bacs configurations in drop-in (example app)
jreij Jul 19, 2023
5116c62
Merge pull request #1270 from Adyen/feature/exclude_payment_components
jreij Jul 20, 2023
464017a
Treat fieldPolicy = hidden in the bin lookup response the same way as…
jreij Aug 2, 2023
40ea42f
Improve and add more tests to CardValidationUtilsTest
jreij Aug 2, 2023
cf75d11
Merge pull request #1283 from Adyen/fix/optional_cvc_validation
jreij Aug 3, 2023
0f05e58
Add on redirect callback
OscarSpruit Jul 31, 2023
8b9be79
Move set redirect listener to common action handling
OscarSpruit Jul 31, 2023
a4481dd
Add on redirect callback to action components
OscarSpruit Aug 1, 2023
732e6a7
Pass redirect method to callback
OscarSpruit Aug 1, 2023
100b721
Add docs
OscarSpruit Aug 1, 2023
7b96163
Provide redirect callback for drop-in
OscarSpruit Aug 1, 2023
db58667
Remove redirect method from callback
OscarSpruit Aug 1, 2023
a06b6c9
Align documentation
OscarSpruit Aug 2, 2023
2239111
Invoke callback from one place
OscarSpruit Aug 2, 2023
7c2e0f6
Merge pull request #1281 from Adyen/feature/redirect_callback
OscarSpruit Aug 3, 2023
a58400c
Support the `checkoutanalytics` web app
jreij Jul 4, 2023
53303e2
Replace the old endpoint with the new analytics endpoint
jreij Jul 4, 2023
58b1aa1
Rename sendAnalyticsEvent to setupAnalytics
jreij Jul 6, 2023
89d89aa
Use the same AnalyticsRepository in drop-in and the components
jreij Jul 18, 2023
2d58895
Ensure that the initial analytics API call is only made once per paym…
jreij Jul 18, 2023
31745b2
Add tests for DefaultAnalyticsRepository
jreij Jul 19, 2023
d81b8bd
Replace isAnalyticsEnabled with AnalyticsConfiguration
jreij Jul 20, 2023
d60f5df
Add AnalyticsParams for internal use
jreij Jul 20, 2023
ea7a908
Update all configurations and component params to use the new analyti…
jreij Jul 20, 2023
efee51c
Update component params mappers to use the new analytics configuratio…
jreij Jul 20, 2023
0653c7a
Update component params mappers tests to use the new analytics config…
jreij Jul 20, 2023
ded6510
Send analytics event only when configured level allows it
jreij Jul 21, 2023
18661c0
Pass AnalyticsParams to DefaultAnalyticsRepository
jreij Jul 21, 2023
4a455d0
Rename sendAnalyticsEvent method to setupAnalytics
jreij Jul 24, 2023
cd8e5ed
Make ComponentParams non Parcelable
jreij Jul 24, 2023
c5b8aeb
Group DefaultAnalyticsRepository constructor parameters into Analytic…
jreij Jul 25, 2023
837d1ee
Send AnalyticsRepositoryData to DefaultAnalyticsRepository
jreij Jul 25, 2023
3a018b1
Always initialize amount in bundle data before launching DropInViewModel
jreij Jul 25, 2023
547dc0c
Include amount in analytics request
jreij Jul 25, 2023
7248e4c
Pass screen width to analytics
jreij Jul 28, 2023
ea26759
Pass payment methods to analytics
jreij Jul 28, 2023
ab4c86b
Add checkoutAttemptId to AnalyticsRepository
jreij Jul 31, 2023
b45253a
Add checkoutAttemptId to `PaymentMethodDetails` and its subclasses
jreij Jul 31, 2023
b0db481
Pass checkoutAttemptId from delegates into `PaymentMethodDetails` sub…
jreij Jul 31, 2023
ab73b8e
Add tests to verify that delegates include checkoutAttemptId in payme…
jreij Jul 31, 2023
08443c8
Send checkoutAttemptId = "do-not-track" when analytics are fully disa…
jreij Jul 31, 2023
c19d5d5
Merge pull request #1285 from Adyen/feature/telemetry
jreij Aug 4, 2023
6488c73
Add badges to README
OscarSpruit Aug 4, 2023
7fcc062
Merge pull request #1286 from Adyen/feature/readme_badges
OscarSpruit Aug 4, 2023
0f586c4
Add setting for telemetry level
jreij Aug 8, 2023
76ad1b5
Rearrange preferences and categories
jreij Aug 8, 2023
c1b2e89
Setup reusable GH workflows
OscarSpruit Aug 8, 2023
d66f851
Merge pull request #1271 from Adyen/feature/reusable_workflows
jreij Aug 8, 2023
a6b2629
Change analytics endpoint from v2 to v3
jreij Aug 8, 2023
e7c433a
Improve preferences and KeyValueStorage
jreij Aug 8, 2023
731ab2e
Suppress ProGuard issues coming from Cash App SDK
OscarSpruit Aug 8, 2023
c093274
Merge pull request #1290 from Adyen/fix/proguard_cash_app
OscarSpruit Aug 9, 2023
d5521b5
Add on bin value callback to CardComponent
OscarSpruit Aug 4, 2023
5a062e9
Add bin value callback to drop-in
OscarSpruit Aug 4, 2023
8018cb6
Add callback to example implementations
OscarSpruit Aug 4, 2023
4d93223
Inline getLogTag in example module
OscarSpruit Aug 4, 2023
51b7dc9
Make sure onRedirect is only called once
OscarSpruit Aug 4, 2023
39a2dbe
Only call on bin value listener when bin value has changed
OscarSpruit Aug 7, 2023
1993df5
Add tests
OscarSpruit Aug 7, 2023
58b3235
Improve InstantFragment by adding Klarna and PayPal as automatic opti…
jreij Aug 9, 2023
33c0d34
Merge pull request #1288 from Adyen/feature/telemetry_endpoint
jreij Aug 10, 2023
e44b9dd
Do not minify enums saved in shared preferences
jreij Aug 15, 2023
95f6adc
Merge pull request #1287 from Adyen/feature/on_bin_changed_callback
OscarSpruit Aug 15, 2023
4915227
Add event to navigate to the payment methods list
OscarSpruit Aug 15, 2023
8e91071
Propagate details on error, cancel and timeout from 3ds2 sdk
ozgur00 Aug 8, 2023
ae977a8
Merge pull request #1294 from Adyen/feature/settings_improvements
jreij Aug 16, 2023
cf036a7
Merge pull request #1292 from Adyen/feature/3ds2-error
ozgur00 Aug 17, 2023
ac0f93c
Allow to refresh payment methods list
OscarSpruit Aug 18, 2023
b566838
Merge pull request #1298 from Adyen/feature/navigate_to_payment_methods
OscarSpruit Aug 21, 2023
387901a
Upgrade 3ds2 sdk to 2.2.15
ozgur00 Aug 21, 2023
a430dc5
Add option to not show a dialog on error
OscarSpruit Aug 10, 2023
9752071
Optionally display dialog on finished
OscarSpruit Aug 15, 2023
92a579c
Use similar concept to show error dialog
OscarSpruit Aug 21, 2023
8d56abc
Merge pull request #1303 from Adyen/feature/3ds2-upgrade
ozgur00 Aug 22, 2023
e54913c
Fix dual branded flow check
ozgur00 Aug 22, 2023
4ea1183
Merge pull request #1297 from Adyen/feature/error_finish_dialog
OscarSpruit Aug 23, 2023
c264348
Fix QR code actions for InstantPaymentComponent
OscarSpruit Aug 22, 2023
2563f04
Merge pull request #1305 from Adyen/fix/dual-brand
ozgur00 Aug 23, 2023
1e8c050
Merge pull request #1304 from Adyen/fix/instant_qr
OscarSpruit Aug 23, 2023
d302f7e
Add on bin lookup callback to CardComponent
OscarSpruit Aug 8, 2023
6feaa8b
Pass data to on bin lookup callback
OscarSpruit Aug 8, 2023
dea01ba
Add payment method variant to bin lookup
OscarSpruit Aug 8, 2023
df66d1f
Add bin lookup callback to drop-in
OscarSpruit Aug 8, 2023
bab68de
Add callback to example implementations
OscarSpruit Aug 8, 2023
f383d59
Prevent text input listeners from being triggered multiple times
OscarSpruit Aug 8, 2023
b018c24
Only trigger callback when detected brands change
OscarSpruit Aug 8, 2023
3282482
Add tests
OscarSpruit Aug 8, 2023
381fad6
Make detected card type flow distinct until changed
OscarSpruit Aug 23, 2023
a119a70
Added check to prevent a crash because supportFragmentManager is alre…
Robert-SD Aug 24, 2023
da33f55
Merge pull request #1289 from Adyen/feature/on_bin_lookup_callback
OscarSpruit Aug 24, 2023
41b9592
Temporarily group all dependency updates in one PR
jreij Aug 24, 2023
4ec4914
Remove updating dependency verification from check PR workflow
OscarSpruit Aug 24, 2023
b5f61b6
Make it possible to run update verification metadata manually
OscarSpruit Aug 24, 2023
a98e048
Merge pull request #1310 from Adyen/dependency_workflow
jreij Aug 24, 2023
a7ef8e7
Merge pull request #1309 from Adyen/renovate/single_pr_temp_fix
jreij Aug 24, 2023
e9097e3
Fix for grouping all dependency updates in one PR
jreij Aug 24, 2023
51da7d7
Merge pull request #1313 from Adyen/renovate/single_pr_temp_fix
jreij Aug 24, 2023
ae5eeac
Target sdk 34
OscarSpruit Aug 24, 2023
c0e16cb
Update verification metadata
OscarSpruit Aug 25, 2023
390e1b6
Merge pull request #1308 from Adyen/feature/android_14
OscarSpruit Aug 25, 2023
3196a3a
Improve workflow caching
OscarSpruit Aug 8, 2023
dc61aa5
Give names to all jobs
OscarSpruit Aug 9, 2023
9ee29e3
Merge pull request #1307 from Robert-SD/fix/rotationCrash
OscarSpruit Aug 25, 2023
9fa89a1
Add auto resolving for jvm toolchains
OscarSpruit Aug 25, 2023
6478e7a
Merge pull request #1316 from Adyen/fix/jvm_toolchain_resolver
OscarSpruit Aug 25, 2023
a1d5b55
Merge pull request #1291 from Adyen/feature/improve_workflow_caching
OscarSpruit Aug 25, 2023
d24365b
Update all-dependencies
renovate[bot] Aug 25, 2023
d144b22
Suppress Kotlin/compose compatibility
OscarSpruit Aug 25, 2023
dc6742a
Fix Cash App Pay issues after updating
OscarSpruit Aug 25, 2023
d977e5a
Update verification-metadata.xml
OscarSpruit Aug 25, 2023
4fe3ddb
Merge pull request #1314 from Adyen/renovate/all-dependencies
jreij Aug 28, 2023
9286831
Revert temp fix to group all dependency updates in one PR
jreij Aug 24, 2023
cd6bf55
Merge pull request #1311 from Adyen/renovate/revert_single_pr_temp_fix
jreij Aug 28, 2023
cf45c8d
Fix value sent for channel in analytics
jreij Aug 25, 2023
03a1ce1
Add sessionId to analytics request
jreij Aug 25, 2023
39e83a3
Add sessionId to analytics request inside providers
jreij Aug 25, 2023
e04b71b
Merge pull request #1318 from Adyen/feature/analytics_session_id
jreij Aug 29, 2023
69146cd
Update dependency composeOptions to v1.5.3
renovate[bot] Aug 30, 2023
14df87b
Merge pull request #1322 from Adyen/renovate/compose_compiler_version
OscarSpruit Aug 30, 2023
bd14a3f
Fix output data not being created on input changes
ozgur00 Sep 6, 2023
50b72cf
Merge pull request #1333 from Adyen/fix/card-distinct
jreij Sep 6, 2023
b483c76
Increase SDK version to 5.0.0-beta01
OscarSpruit Aug 30, 2023
53812a8
Update v4 references to latest version
OscarSpruit Aug 30, 2023
576dd5b
Update release notes for 5.0.0-beta01
OscarSpruit Aug 30, 2023
9423317
Merge pull request #1323 from Adyen/release/5.0.0-beta01
jreij Sep 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions .github/workflows/assemble.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Assemble

on:
workflow_call

jobs:
assemble-debug:
name: Assemble debug
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run assembleDebug
run: ./gradlew assDeb --no-daemon

- name: Cache build output
uses: actions/cache/save@v3
with:
path: /home/runner/work/adyen-android/adyen-android
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
40 changes: 15 additions & 25 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
name: Check PR

# Every PR should be checked for static analysis
on:
pull_request:
branches-ignore:
- 'main'
types: [ opened, synchronize, reopened ]

jobs:
gradle-check:
# https://github.com/actions/virtual-environments/
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3

# Setup Java 17
# https://github.com/marketplace/actions/setup-java-jdk
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Run gradlew check
- name: Gradle check
run: ./gradlew check --no-daemon
jobs:
code_analysis:
name: Code analysis
uses: ./.github/workflows/code_analysis.yml
assemble:
name: Assemble
uses: ./.github/workflows/assemble.yml
needs: code_analysis
test:
name: Test
uses: ./.github/workflows/run_tests.yml
needs: assemble
45 changes: 45 additions & 0 deletions .github/workflows/code_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Perform code analysis

on:
workflow_call

jobs:
detekt:
name: Run detekt
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run detekt
run: ./gradlew detekt --no-daemon

ktlint:
name: Run ktlint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run ktlint
run: ./gradlew ktlint --no-daemon
16 changes: 16 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,27 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3

# Setup Java 17
# https://github.com/marketplace/actions/setup-java-jdk
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Generate kdocs
- name: Generate Dokka HTML documentation
run: ./gradlew dokkaHtmlMultiModule --no-daemon

# Deploy to GitHub Pages
- name: Deploy GitHub Pages
uses: JamesIves/[email protected]
with:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test

on:
workflow_call

jobs:
unit-test:
name: Run unit tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- uses: actions/cache/restore@v3
with:
path: /home/runner/work/adyen-android/adyen-android
key: cache-${{ github.run_id }}-${{ github.run_attempt }}

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run testDebugUnitTest
run: ./gradlew testDebugUnitTest --no-daemon

lint:
name: Run lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- uses: actions/cache/restore@v3
with:
path: /home/runner/work/adyen-android/adyen-android
key: cache-${{ github.run_id }}-${{ github.run_attempt }}

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run lintDebug
run: ./gradlew lintDebug --no-daemon
32 changes: 11 additions & 21 deletions .github/workflows/update_verification_metadata.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,35 @@
name: Update verification metadata

on:
push:
branches:
- 'renovate/**'
paths:
- 'dependencies.gradle'
workflow_dispatch:

jobs:
gradle-update-verification-metadata:
# https://github.com/actions/virtual-environments/
update-verification-metadata:
name: Update verification metadata
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

# Setup Java 17
# https://github.com/marketplace/actions/setup-java-jdk
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Run gradlew check

- name: Gradle update verification metadata
run: ./gradlew --write-verification-metadata sha256 build --no-daemon

- name: Commit
run: |
git config --local user.email 'action@github.com'
git config --local user.name 'GitHub Action'
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git add .
git commit -am 'Update verification metadata'

- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
git diff-index --quiet HEAD || git commit -am 'Update verification metadata'
git push
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.adyen.checkout.adyen3ds2.internal.provider.Adyen3DS2ComponentProvider
import com.adyen.checkout.adyen3ds2.internal.ui.Adyen3DS2Delegate
import com.adyen.checkout.components.core.RedirectableActionComponent
import com.adyen.checkout.components.core.action.Action
import com.adyen.checkout.components.core.internal.ActionComponent
import com.adyen.checkout.components.core.internal.ActionComponentEvent
Expand All @@ -35,7 +36,8 @@ class Adyen3DS2Component internal constructor(
) : ViewModel(),
ActionComponent,
IntentHandlingComponent,
ViewableComponent {
ViewableComponent,
RedirectableActionComponent {

override val viewFlow: Flow<ComponentViewType?> = delegate.viewFlow

Expand Down Expand Up @@ -69,6 +71,10 @@ class Adyen3DS2Component internal constructor(
return PROVIDER.canHandleAction(action)
}

override fun setOnRedirectListener(listener: () -> Unit) {
delegate.setOnRedirectListener(listener)
}

override fun onCleared() {
super.onCleared()
Logger.d(TAG, "onCleared")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package com.adyen.checkout.adyen3ds2
import android.content.Context
import android.content.IntentFilter
import com.adyen.checkout.components.core.Amount
import com.adyen.checkout.components.core.AnalyticsConfiguration
import com.adyen.checkout.components.core.internal.BaseConfigurationBuilder
import com.adyen.checkout.components.core.internal.Configuration
import com.adyen.checkout.core.Environment
Expand All @@ -27,7 +28,7 @@ class Adyen3DS2Configuration private constructor(
override val shopperLocale: Locale,
override val environment: Environment,
override val clientKey: String,
override val isAnalyticsEnabled: Boolean?,
override val analyticsConfiguration: AnalyticsConfiguration?,
override val amount: Amount,
val uiCustomization: UiCustomization?,
val threeDSRequestorAppURL: String?,
Expand Down Expand Up @@ -97,7 +98,7 @@ class Adyen3DS2Configuration private constructor(
shopperLocale = shopperLocale,
environment = environment,
clientKey = clientKey,
isAnalyticsEnabled = isAnalyticsEnabled,
analyticsConfiguration = analyticsConfiguration,
amount = amount,
uiCustomization = uiCustomization,
threeDSRequestorAppURL = threeDSRequestorAppURL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package com.adyen.checkout.adyen3ds2.internal.data.model

import com.adyen.checkout.core.exception.ComponentException
import com.adyen.threeds2.CompletionEvent
import org.json.JSONException
import org.json.JSONObject

Expand All @@ -32,10 +31,10 @@ internal class Adyen3DS2Serializer {
}

@Throws(ComponentException::class)
fun createChallengeDetails(completionEvent: CompletionEvent): JSONObject {
fun createChallengeDetails(transactionStatus: String, errorDetails: String? = null): JSONObject {
val challengeDetails = JSONObject()
try {
val challengeResult = ChallengeResult.from(completionEvent)
val challengeResult = ChallengeResult.from(transactionStatus, errorDetails)
challengeDetails.put(CHALLENGE_DETAILS_KEY, challengeResult.payload)
} catch (e: JSONException) {
throw ComponentException("Failed to create challenge details", e)
Expand All @@ -45,12 +44,13 @@ internal class Adyen3DS2Serializer {

@Throws(ComponentException::class)
fun createThreeDsResultDetails(
completionEvent: CompletionEvent,
authorisationToken: String
transactionStatus: String,
authorisationToken: String,
errorDetails: String? = null,
): JSONObject {
val threeDsDetails = JSONObject()
try {
val challengeResult = ChallengeResult.from(completionEvent, authorisationToken)
val challengeResult = ChallengeResult.from(transactionStatus, errorDetails, authorisationToken)
threeDsDetails.put(THREEDS_RESULT_KEY, challengeResult.payload)
} catch (e: JSONException) {
throw ComponentException("Failed to create ThreeDS Result details", e)
Expand Down
Loading