Skip to content

Commit

Permalink
Add migration guide for v14.5.0 (#2536)
Browse files Browse the repository at this point in the history
* Add migration guide for v14.5.0

* Fix wording

* Add code sample
  • Loading branch information
smaskell-stripe authored Jun 1, 2020
1 parent 1eadb29 commit d42a37d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
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.

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

0 comments on commit d42a37d

Please sign in to comment.