-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(POM-312): Card Update scripts and documentation (#143)
- Loading branch information
1 parent
2a86c0d
commit ccbdf7e
Showing
14 changed files
with
178 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Wed Oct 05 19:43:19 EEST 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Module ProcessOut Android SDK - UI | ||
|
||
## Card Update | ||
|
||
### Launch Card Update Bottom Sheet | ||
|
||
```kotlin | ||
// 1) It is required to initialize launcher in onCreate() method of Activity or Fragment. | ||
|
||
private lateinit var launcher: POCardUpdateLauncher | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
launcher = POCardUpdateLauncher.create(from = this) { result -> | ||
result.onSuccess { card -> | ||
TODO() | ||
}.onFailure { TODO() } | ||
} | ||
} | ||
|
||
// 2) Launch the activity. | ||
|
||
launcher.launch( | ||
POCardUpdateConfiguration( | ||
cardId = "card_" | ||
) | ||
) | ||
``` | ||
|
||
### Configuration | ||
|
||
```kotlin | ||
POCardUpdateConfiguration( | ||
cardId = "card_", | ||
options = POCardUpdateConfiguration.Options( | ||
title = "Payment details", | ||
cardInformation = POCardUpdateConfiguration.CardInformation( | ||
maskedNumber = "4010 **** **** **21", | ||
iin = "401000", | ||
scheme = "visa", | ||
preferredScheme = "carte bancaire" | ||
), | ||
primaryActionText = "Submit", | ||
secondaryActionText = "Cancel", | ||
cancellation = POCancellationConfiguration( | ||
secondaryAction = true, | ||
backPressed = false, | ||
dragDown = true, | ||
touchOutside = false | ||
) | ||
), | ||
style = POCardUpdateConfiguration.Style( | ||
// Customize the look and feel. | ||
) | ||
) | ||
``` | ||
|
||
### Lifecycle Events | ||
|
||
```kotlin | ||
viewModelScope.launch { | ||
ProcessOut.instance.dispatchers.cardUpdate | ||
.events.collect { event -> | ||
when (event) { | ||
POCardUpdateEvent.DidStart -> TODO() | ||
POCardUpdateEvent.ParametersChanged -> TODO() | ||
POCardUpdateEvent.WillUpdateCard -> TODO() | ||
POCardUpdateEvent.DidComplete -> TODO() | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters