Skip to content
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 migration guide for v14.5.0 #2536

Merged
merged 3 commits into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Fixes #2463 on Android API level 26 and above
* [#2483](https://github.com/stripe/stripe-android/pull/2483) Fix formatting of `maxTimeout` value in `Stripe3ds2AuthParams`
* [#2494](https://github.com/stripe/stripe-android/pull/2494) Support starting 3DS2 challenge flow from a Fragment
* [#2496](https://github.com/stripe/stripe-android/pull/2496) Deprecate `StripeIntent.stripeSdkData`
* [#2497](https://github.com/stripe/stripe-android/pull/2497) Deprecate `StripeIntent.redirectData`
* [#2513](https://github.com/stripe/stripe-android/pull/2513) Add `canDeletePaymentMethods` to `PaymentSessionConfig`
* `canDeletePaymentMethods` controls whether the user can delete a payment method
by swiping on it in `PaymentMethodsActivity`
Expand Down
35 changes: 35 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Migration Guide

## Migrating from versions < 14.5.0
- Changes to `StripeIntent`
- `redirectData` is now deprecated.
smaskell-stripe marked this conversation as resolved.
Show resolved Hide resolved

If a `PaymentIntent` or `SetupIntent` requires a redirect to authenticate, this information will be in `nextActionData`.
However, as before, this action will be handled by the SDK in `Stripe.confirmPayment`/`Stripe.confirmSetupIntent`.

```kotlin
// before
if (intent.redirectData != null) {
// requires redirect
}

// after
when (intent.nextActionData) {
is StripeIntent.RedirectData.RedirectToUrl -> // requires redirect
}
```
- `stripeSdkData` is now deprecated.

If a `PaymentIntent` or `SetupIntent` requires 3DS1 or 3DS2 authentication, this information will be in `nextActionData`.
However, as before, this action will be handled by the SDK in `Stripe.confirmPayment`/`Stripe.confirmSetupIntent`.

```kotlin
// before
if (intent.stripeSdkData != null) {
// requires 3D Secure auth
}

// after
when (intent.nextActionData) {
is StripeIntent.RedirectData.SdkData -> // requires 3D Secure auth
}
```

## Migrating from versions < 14.0.0
- Changes to Stripe Error localization
- All [Stripe Error messages](https://stripe.com/docs/api/errors#errors-message) are now localized
Expand Down