-
Notifications
You must be signed in to change notification settings - Fork 663
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
Introduce suspend fun
for Stripe Android SDK - part2
#3568
Conversation
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.
LGTM!
The data
comment is not a blocker but might be worth while investigating. IMO, the caller should determine if it has an Intent
instance before calling the extension functions and handle that case appropriately. It may result in a better API or may end up complicating things too much on the calling code.
@ccen-stripe can you hold off on merging this? I'd like to 👀 . |
stripe/src/main/java/com/stripe/android/StripePaymentController.kt
Outdated
Show resolved
Hide resolved
stripe/src/main/java/com/stripe/android/StripePaymentController.kt
Outdated
Show resolved
Hide resolved
stripe/src/test/java/com/stripe/android/StripePaymentAuthTest.kt
Outdated
Show resolved
Hide resolved
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.
One more pass on method docs
suspend fun
for Stripe Android SDK - part2
Summary
Introduce
suspend fun
for all existing Stripe APIs.Note: the doc linked to in this PR is internal only
This is a follow up change on #3557, for the changes in 'get' APIs, the following changes are made:
isForPaymentintentResult
,isForSetupIntentResult
inStripe.kt
, checking ifresultCode
andIntent
is for requiredStripeModel
getPaymentIntentResult
,getSetupIntentResult
andgetSource
inPaymentController
getPaymentIntentResult
,getSetupIntentResult
andgetSource
inStripeKtx.kt
by invoking the functions above, retrievingStripeModel
fromresultCode
andIntent
on activity resultWill add these to the example app in a follow up PR.
Motivation
For details, please refer to this doc
Fixes #2642
Testing