-
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 support for blik payment intent and payment method #3479
Conversation
stripe/src/main/java/com/stripe/android/model/ConfirmPaymentIntentParams.kt
Outdated
Show resolved
Hide resolved
stripe/src/main/java/com/stripe/android/model/PaymentMethodCreateParams.kt
Show resolved
Hide resolved
stripe/src/main/java/com/stripe/android/model/PaymentMethodOptionsParams.kt
Outdated
Show resolved
Hide resolved
companion object { | ||
const val PARAM_CODE = "code" | ||
} |
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.
private companion object
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.
made this internal so that test could access them, please lmk if this is necessary, happy to change otherwise :)
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!
override fun hashCode(): Int { | ||
return 0 | ||
} | ||
override fun equals(other: Any?): Boolean { | ||
return true | ||
} |
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.
remove
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.
seems not compilable without explicitly override this as the object instance without any parameterized field won't be able to tell how to parcel itself, also tried replacing with a regular data class
and get similar compilation error
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.
@Parcelize
can apply to an object
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.
We can examine this in a future PR
@@ -220,5 +222,15 @@ interface StripeIntent : StripeModel { | |||
) : Parcelable | |||
} | |||
} | |||
|
|||
@Parcelize | |||
object BlikAuthorize : NextActionData() { |
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.
This falls into the else case in StripPaymentController as the SDK doesn't need to do anything upon seeing `"next_action": {
"type": "blik_authorize"
},
Is this correct behavior?
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.
That seems fine for now.
Summary
Add support for blik Single use.
The following fields are added:
blik
when creating a payment methodblik
with fieldcode
for blik mobile banking app code when confirming a paymentnext_action
typeblik_authorize
onPaymentIntent
This PR does change any
SetupIntent
, which is required for blik, as it's not ready yet on pay server.Motivation
Support blik on Android mobile SDK
Testing