Skip to content

Commit 182c745

Browse files
authored
Update external billing description (#142)
The payment method now displays the username instead of the payment method name.
1 parent 7f1190a commit 182c745

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

scripts/maven.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
task androidSourcesJar(type: Jar) {
2-
archiveClassifier.set('sources')
3-
from android.sourceSets.main.java.srcDirs
2+
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
43
}
54

65
version = project.sdkVersion
@@ -20,7 +19,6 @@ afterEvaluate {
2019
}
2120
"$libName"(MavenPublication) {
2221
from project.components.release
23-
artifact androidSourcesJar
2422

2523
groupId = 'io.snabble.sdk'
2624
artifactId = project.name

ui/src/main/java/io/snabble/sdk/ui/payment/externalbilling/ExternalBillingFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ open class ExternalBillingFragment : BaseFragment(
6161
}
6262
}
6363

64-
val title = stringResource(id = R.string.Snabble_Payment_ExternalBilling_title)
64+
val idDescriptor = stringResource(id = R.string.Snabble_Payment_ExternalBilling_username)
6565

6666
ThemeWrapper {
6767
ExternalBillingLoginScreen(
6868
onSaveClick = { username, password ->
6969
projectId?.let {
70-
viewModel.login(title, username, password, it)
70+
viewModel.login(idDescriptor, username, password, it)
7171
}
7272
},
7373
isInputValid = false,

ui/src/main/java/io/snabble/sdk/ui/payment/externalbilling/viewmodel/ExternalBillingViewModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ExternalBillingViewModel : ViewModel() {
1818
private var _uiState = MutableStateFlow<UiState>(Processing)
1919
internal val uiState: StateFlow<UiState> = _uiState.asStateFlow()
2020

21-
fun login(paymentMethod: String, username: String, password: String, projectId: String): Boolean {
21+
fun login(idDescriptor: String, username: String, password: String, projectId: String): Boolean {
2222
viewModelScope.launch {
2323
val project = Snabble.projects.find { it.id == projectId }
2424
project?.let {
@@ -37,7 +37,7 @@ class ExternalBillingViewModel : ViewModel() {
3737
password = password
3838
),
3939
projectId,
40-
paymentMethod,
40+
"$idDescriptor: $username",
4141
)
4242
val success = repo.addPaymentCredentials(paymentCredentials)
4343
if (success && paymentCredentials != null) {

0 commit comments

Comments
 (0)