-
Notifications
You must be signed in to change notification settings - Fork 662
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
Add stripe account param to authenticate source #2406
Add stripe account param to authenticate source #2406
Conversation
@@ -42,11 +42,20 @@ class KlarnaSourceActivity : AppCompatActivity() { | |||
viewBinding.progressBar.visibility = View.VISIBLE | |||
createKlarnaSource().observe(this, Observer { result -> | |||
viewBinding.progressBar.visibility = View.INVISIBLE | |||
val stripeAccount = viewBinding.stripeAccount.text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can move this inside is SourceViewModel.SourceResult.Success -> {
block
also you can make it a one-liner:
stripeAccountId = viewBinding.stripeAccount.text.toString().takeIf {
it.isNotBlank()
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I knew there must be a way to do this. Still kinda wish they just had an optional monad but I totally get why they do it this way
…ID-247_authenticate_source
@mshafrir should I test this with the card auth activity as well? How do I get a card that needs authentication? |
…ROID-247_confirm_setup
…ID-247_authenticate_source
Summary
Motivation
Testing
Tested manually with klarna. Have not yet tested with a card because I'm not sure how to create a card that requires authentication