Skip to content

Commit e241fa7

Browse files
author
jenkins-mobile
committed
Release 6.5.0
1 parent 4216192 commit e241fa7

File tree

63 files changed

+3533
-1108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3533
-1108
lines changed

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.4.5
1+
6.5.0

.version_code

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6040500
1+
6050000

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
### NEXT_VERSION_DESCRIPTION_BEGIN
66
### NEXT_VERSION_DESCRIPTION_END
77

8+
## [6.5.0] (16-03-2022)
9+
10+
- Hide ThreatMetrix into mSdk
11+
- Update documentation
12+
813
## [6.4.5] (06-12-2021)
914

1015
- Add confirmation in tokenize

MIGRATION.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Migration guide
22

33
### Table of Contents
4+
[6.4.5 -> 6.5.0](##6---6)
5+
- Удалить библиотеку ThreatMetrix-Android-SDK-.aar, теперь она встроена в само SDK.
6+
47
[6.0.0 -> 6.0.2](##6---6)
58
- Убрать зависимость `implementation ("ru.yoomoney.sdk.auth:auth:$yoo_sdk_auth_version")` - теперь она подтягивается автоматически
69

@@ -74,7 +77,8 @@ dependencies {
7477
}
7578
```
7679

77-
### **Подключить `ThreatMetrix Android SDK 6.2-97
80+
### **Подключить `ThreatMetrix Android SDK 6.2-97.aar`**
81+
7882
> Если вы не использовали платежный метод “ЮMoney”, и не подключали sdk авторизации, то этот блок можно пропустить.
7983
8084
Попросите у менеджера по подключению библиотеку `ThreatMetrix Android SDK 6.2-97.aar`. Создайте папку libs в модуле где подключаете sdk и добавьте туда файл `ThreatMetrix Android SDK 6.2-97.aar`. В build.gradle того же модуля в dependencies добавьте:

README.md

+1,347-267
Large diffs are not rendered by default.

README_RU.md

100755100644
+1,294-347
Large diffs are not rendered by default.
Loading
Loading
Loading
Loading
208 KB
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
381 Bytes
Loading

build.gradle

+9-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ allprojects {
2828
applyFromFileIfExists('buildInternal.gradle')
2929

3030
buildscript {
31-
ext.kotlin_version = '1.4.32'
31+
ext.kotlin_version = '1.5.21'
3232
ext.dokka_version = '0.9.17'
3333
ext.okhttp_version = '4.3.1'
3434
ext.mockito_version = '2.19.0'
@@ -42,16 +42,16 @@ buildscript {
4242
ext.material = '1.2.1'
4343
ext.recyclerview = '1.1.0'
4444
ext.constraintlayout = '2.0.1'
45-
ext.espresso_core = '3.3.0'
46-
ext.espresso_intents = '3.3.0'
47-
ext.espresso_web = '3.3.0'
45+
ext.espresso_core = '3.4.0'
46+
ext.espresso_intents = '3.4.0'
47+
ext.espresso_web = '3.4.0'
4848
ext.androidx_junit = '1.1.2'
4949

50-
ext.target_sdk_version = 30
50+
ext.target_sdk_version = 31
5151

5252
repositories {
5353
google()
54-
jcenter()
54+
mavenCentral()
5555
maven { url "https://jitpack.io" }
5656
def file = file("buildscriptDependencies.gradle")
5757
if (file.exists()) {
@@ -60,7 +60,7 @@ buildscript {
6060
}
6161

6262
dependencies {
63-
classpath 'com.android.tools.build:gradle:4.2.2'
63+
classpath "com.android.tools.build:gradle:7.0.3"
6464
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
6565
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokka_version"
6666
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6'
@@ -72,9 +72,8 @@ buildscript {
7272
allprojects {
7373
repositories {
7474
google()
75-
jcenter()
7675
mavenCentral()
77-
maven { url "http://pay.cards/maven" }
76+
maven { url "https://pay.cards/maven" }
7877
maven { url "https://jitpack.io" }
7978
}
8079
}
@@ -85,4 +84,4 @@ if (file("buildscriptDependencies.gradle").exists()) {
8584

8685
task clean(type: Delete) {
8786
delete rootProject.buildDir
88-
}
87+
}

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ distributionBase=GRADLE_USER_HOME
2424
distributionPath=wrapper/dists
2525
zipStoreBase=GRADLE_USER_HOME
2626
zipStorePath=wrapper/dists
27-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
27+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip

library/build.gradle

+3-40
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ext {
3232

3333
android {
3434
compileSdkVersion target_sdk_version
35-
buildToolsVersion "30.0.2"
35+
buildToolsVersion "31.0.0"
3636

3737
resourcePrefix 'ym_'
3838

@@ -89,42 +89,5 @@ android {
8989
}
9090
}
9191

92-
dependencies {
93-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
94-
implementation 'com.google.android.gms:play-services-wallet:18.1.2'
95-
implementation "androidx.appcompat:appcompat:$appcompat"
96-
implementation "com.google.android.material:material:$material"
97-
implementation "androidx.recyclerview:recyclerview:$recyclerview"
98-
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout"
99-
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
100-
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
101-
implementation 'com.yandex.android:mobmetricalib:3.21.0'
102-
implementation 'ru.tinkoff.decoro:decoro:1.5.0'
103-
implementation 'androidx.fragment:fragment-ktx:1.3.5'
104-
105-
implementation 'commons-io:commons-io:2.5'
106-
implementation 'commons-codec:commons-codec:1.15'
107-
implementation "ru.yoomoney.sdk:march:$march_lib_version"
108-
implementation "ru.yoomoney.sdk.gui:ui-lib:$ui_lib_version"
109-
compileOnly fileTree(dir: "libs", include: ["profiling-tool.aar"])
110-
implementation ("ru.yoomoney.sdk.auth:auth:$yoo_sdk_auth_version")
111-
112-
def daggerVersion = "2.35.1"
113-
implementation "com.google.dagger:dagger:$daggerVersion"
114-
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
115-
116-
testImplementation "junit:junit:$junit"
117-
testImplementation 'androidx.test:core:1.3.0'
118-
testImplementation "org.mockito:mockito-core:$mockito_version"
119-
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0"
120-
testImplementation 'org.robolectric:robolectric:4.0.1'
121-
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.7"
122-
testImplementation 'org.assertj:assertj-core:3.15.0'
123-
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.7"
124-
}
125-
126-
task copyTestClasses(type: Copy) {
127-
from "build/tmp/kotlin-classes/devDebugUnitTest"
128-
into "build/intermediates/classes/devDebug"
129-
exclude '*/META-INF/library_devDebug.kotlin_module'
130-
}
92+
apply from: 'buildDependencies.gradle'
93+
apply from: 'buildTestDependencies.gradle'

library/buildDependencies.gradle

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* The MIT License (MIT)
3+
* Copyright © 2022 NBCO YooMoney LLC
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6+
* associated documentation files (the “Software”), to deal in the Software without restriction, including
7+
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8+
* of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9+
* following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all copies or substantial
12+
* portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16+
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
17+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
18+
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19+
* OTHER DEALINGS IN THE SOFTWARE.
20+
*/
21+
22+
dependencies {
23+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
24+
implementation 'com.google.android.gms:play-services-wallet:18.1.2'
25+
implementation 'androidx.work:work-runtime:2.7.1'
26+
implementation "androidx.appcompat:appcompat:$appcompat"
27+
implementation "com.google.android.material:material:$material"
28+
implementation "androidx.recyclerview:recyclerview:$recyclerview"
29+
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout"
30+
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
31+
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
32+
implementation 'com.yandex.android:mobmetricalib:4.1.1'
33+
implementation 'ru.tinkoff.decoro:decoro:1.5.0'
34+
implementation 'androidx.fragment:fragment-ktx:1.3.5'
35+
36+
implementation 'commons-io:commons-io:2.5'
37+
implementation 'commons-codec:commons-codec:1.15'
38+
implementation "ru.yoomoney.sdk:march:$march_lib_version"
39+
implementation "ru.yoomoney.sdk.gui:ui-lib:$ui_lib_version"
40+
implementation ("ru.yoomoney.sdk.auth:auth:$yoo_sdk_auth_version")
41+
42+
def daggerVersion = "2.35.1"
43+
implementation "com.google.dagger:dagger:$daggerVersion"
44+
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
45+
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License (MIT)
3-
* Copyright © 2020 NBCO YooMoney LLC
3+
* Copyright © 2022 NBCO YooMoney LLC
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
66
* associated documentation files (the “Software”), to deal in the Software without restriction, including
@@ -19,18 +19,13 @@
1919
* OTHER DEALINGS IN THE SOFTWARE.
2020
*/
2121

22-
package ru.yoomoney.sdk.kassa.payments.metrics
23-
24-
import ru.yoomoney.sdk.kassa.payments.paymentAuth.PaymentAuthTokenRepository
25-
26-
internal class UserAuthTokenTypeParamProvider(
27-
private val paymentAuthTokenRepository: PaymentAuthTokenRepository
28-
) : () -> AuthTokenType {
29-
30-
override fun invoke() = if (paymentAuthTokenRepository.isPaymentAuthPersisted) {
31-
AuthTokenTypeMultiple()
32-
} else {
33-
AuthTokenTypeSingle()
34-
}
35-
36-
}
22+
dependencies {
23+
testImplementation "junit:junit:$junit"
24+
testImplementation 'androidx.test:core:1.4.0'
25+
testImplementation "org.mockito:mockito-core:$mockito_version"
26+
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
27+
testImplementation 'org.robolectric:robolectric:4.3.1'
28+
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0"
29+
testImplementation 'org.assertj:assertj-core:3.15.0'
30+
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0"
31+
}

library/jacoco.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
apply plugin: 'jacoco'
2323

2424
jacoco {
25-
toolVersion = "0.7.9"
25+
toolVersion = "0.8.6"
2626
reportsDir = file("$buildDir/reports")
2727
}
2828

library/src/debug/AndroidManifest.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
-->
2121

2222
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
23+
xmlns:tools="http://schemas.android.com/tools"
2324
package="ru.yoomoney.sdk.kassa.payments">
24-
<application>
25+
<application
26+
android:networkSecurityConfig="@xml/ym_network_security_config"
27+
tools:targetApi="n">
2528
<activity
2629
android:name="ru.yoomoney.sdk.kassa.payments.utils.WebViewActivity"
2730
android:exported="false" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<network-security-config xmlns:tools="http://schemas.android.com/tools"
2+
tools:ignore="ResourceName">
3+
<debug-overrides>
4+
<trust-anchors>
5+
<!-- Trust user added CAs while debuggable only -->
6+
<certificates src="user"/>
7+
</trust-anchors>
8+
</debug-overrides>
9+
<domain-config cleartextTrafficPermitted="true">
10+
<domain includeSubdomains="true">jenkins-ot.test.yamoney.ru</domain>
11+
<domain includeSubdomains="true">iva-test-cms1.yamoney.ru</domain>
12+
<domain includeSubdomains="true">stubohub.appb2b1.cloud.yooteam.ru</domain>
13+
<domain includeSubdomains="true">payment-api-v3.appb2b1.cloud.yooteam.ru</domain>
14+
</domain-config>
15+
</network-security-config>

library/src/main/java/ru/yoomoney/sdk/kassa/payments/Checkout.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ object Checkout {
131131
return WebViewActivity.create(
132132
context = context,
133133
url = url,
134-
logParam = "screen3ds"
134+
logParam = "openScreen3ds"
135135
)
136136
}
137137

@@ -218,7 +218,7 @@ object Checkout {
218218
WebViewActivity.create(
219219
context = context,
220220
url = confirmationUrl,
221-
logParam = "screen3ds"
221+
logParam = "openScreen3ds"
222222
)
223223
}
224224
}

library/src/main/java/ru/yoomoney/sdk/kassa/payments/contract/TokenizeAnalytics.kt

+24-17
Original file line numberDiff line numberDiff line change
@@ -21,57 +21,64 @@
2121

2222
package ru.yoomoney.sdk.kassa.payments.contract
2323

24+
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.PaymentParameters
2425
import ru.yoomoney.sdk.kassa.payments.metrics.AuthType
25-
import ru.yoomoney.sdk.kassa.payments.metrics.ErrorScreenReporter
2626
import ru.yoomoney.sdk.kassa.payments.metrics.Reporter
27-
import ru.yoomoney.sdk.kassa.payments.model.LinkedCard
28-
import ru.yoomoney.sdk.kassa.payments.model.BankCardPaymentOption
29-
import ru.yoomoney.sdk.kassa.payments.model.PaymentIdCscConfirmation
27+
import ru.yoomoney.sdk.kassa.payments.metrics.SavePaymentMethodProvider
3028
import ru.yoomoney.sdk.march.Logic
3129
import ru.yoomoney.sdk.march.Out
3230
import ru.yoomoney.sdk.kassa.payments.metrics.TokenizeScheme
31+
import ru.yoomoney.sdk.kassa.payments.metrics.TokenizeSchemeParamProvider
3332
import ru.yoomoney.sdk.kassa.payments.model.PaymentInstrumentBankCard
3433
import ru.yoomoney.sdk.kassa.payments.model.PaymentOption
3534

35+
private const val ACTION_SCREEN_PAYMENT_CONTRACT = "screenPaymentContract"
36+
private const val ACTION_SCREEN_PAYMENT_CONTRACT_ERROR = "screenErrorContract"
37+
private const val ACTION_LOGOUT = "actionLogout"
38+
3639
internal class ContractAnalytics(
3740
private val reporter: Reporter,
38-
private val errorScreenReporter: ErrorScreenReporter,
3941
private val businessLogic: Logic<Contract.State, Contract.Action>,
4042
private val getUserAuthType: () -> AuthType,
43+
private val paymentParameters: PaymentParameters,
44+
private val tokenizeSchemeParamProvider: TokenizeSchemeParamProvider,
4145
private val getTokenizeScheme: (PaymentOption, PaymentInstrumentBankCard?) -> TokenizeScheme
4246
) : Logic<Contract.State, Contract.Action> {
4347

4448
override fun invoke(state: Contract.State, action: Contract.Action): Out<Contract.State, Contract.Action> {
4549
val nameArgsPairs = when (action) {
46-
Contract.Action.Logout -> listOf("actionLogout" to null)
50+
Contract.Action.Logout -> listOf(ACTION_LOGOUT to null)
4751
is Contract.Action.LoadContractSuccess -> {
4852
listOf(
49-
"screenPaymentContract" to listOf(
53+
ACTION_SCREEN_PAYMENT_CONTRACT to listOf(
5054
getUserAuthType(),
5155
getTokenizeScheme(
5256
action.outputModel.paymentOption,
5357
action.outputModel.instrument
5458
)
55-
),
56-
when (action.outputModel.paymentOption) {
57-
is BankCardPaymentOption -> "screenBankCardForm" to listOf(getUserAuthType())
58-
is LinkedCard -> "screenLinkedCardForm" to null
59-
is PaymentIdCscConfirmation -> "screenRecurringCardForm" to null
60-
else -> null to null
61-
}
59+
)
6260
)
6361
}
62+
is Contract.Action.LoadContractFailed -> {
63+
tokenizeSchemeParamProvider.invoke()?.let { tokenizeScheme ->
64+
listOf(
65+
ACTION_SCREEN_PAYMENT_CONTRACT_ERROR to listOf(
66+
getUserAuthType(),
67+
tokenizeScheme,
68+
SavePaymentMethodProvider().invoke(paymentParameters)
69+
)
70+
)
71+
}
72+
}
6473
else -> listOf(null to null)
6574
}
6675

67-
nameArgsPairs.forEach { pair ->
76+
nameArgsPairs?.forEach { pair ->
6877
pair.first?.let {
6978
reporter.report(it, pair.second)
7079
}
7180
}
7281

73-
errorScreenReporter.takeIf { action is Contract.Action.LoadContractFailed }?.report()
74-
7582
return businessLogic(state, action)
7683
}
7784
}

0 commit comments

Comments
 (0)