From 7af4312510cd7426408209ec11745756a1f4f76a Mon Sep 17 00:00:00 2001 From: Samuel Maskell Date: Mon, 1 Jun 2020 12:03:13 -0700 Subject: [PATCH 1/3] Add migration guide for v14.5.0 --- CHANGELOG.md | 2 ++ MIGRATING.md | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc4bfb5311..f661eb0f7d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ * [#2525](https://github.com/stripe/stripe-android/pull/2525) Upgrade Android Gradle Plugin to 4.0.0 * [#2531](https://github.com/stripe/stripe-android/pull/2531) Update 3DS2 SDK to 3.0.2 * Fix bug in 3DS2 SDK where multi-screen challenges were not correctly returning result to starting Activity/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 ## 14.4.1 - 2020-04-30 * [#2441](https://github.com/stripe/stripe-android/pull/2441) Catch `IllegalArgumentException` in `ApiOperation` diff --git a/MIGRATING.md b/MIGRATING.md index cfde405d542..532c6553fab 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -1,5 +1,16 @@ # Migration Guide +## Migrating from versions < 14.5.0 +- Changes to `StripeIntent` + - `redirectData` is now deprecated. + + If an `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`. + - `sdkData` is now deprecated. + + If an `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`. + ## 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 From 16fe21f869de6073c909d5f633ced964164f3c11 Mon Sep 17 00:00:00 2001 From: Samuel Maskell Date: Mon, 1 Jun 2020 12:16:04 -0700 Subject: [PATCH 2/3] Fix wording --- CHANGELOG.md | 4 ++-- MIGRATING.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f661eb0f7d9..22ef9aac1e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,14 +11,14 @@ * 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` * [#2525](https://github.com/stripe/stripe-android/pull/2525) Upgrade Android Gradle Plugin to 4.0.0 * [#2531](https://github.com/stripe/stripe-android/pull/2531) Update 3DS2 SDK to 3.0.2 * Fix bug in 3DS2 SDK where multi-screen challenges were not correctly returning result to starting Activity/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 ## 14.4.1 - 2020-04-30 * [#2441](https://github.com/stripe/stripe-android/pull/2441) Catch `IllegalArgumentException` in `ApiOperation` diff --git a/MIGRATING.md b/MIGRATING.md index 532c6553fab..ad08915e94c 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -4,11 +4,11 @@ - Changes to `StripeIntent` - `redirectData` is now deprecated. - If an `PaymentIntent` or `SetupIntent` requires a redirect to authenticate, this information will be in `nextActionData`. + 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`. - - `sdkData` is now deprecated. + - `stripeSdkData` is now deprecated. - If an `PaymentIntent` or `SetupIntent` requires 3DS1 or 3DS2 authentication, this information will be in `nextActionData`. + 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`. ## Migrating from versions < 14.0.0 From 28b2262b6ccf601cda2e93b97630a6e5ecae6272 Mon Sep 17 00:00:00 2001 From: Samuel Maskell Date: Mon, 1 Jun 2020 12:19:55 -0700 Subject: [PATCH 3/3] Add code sample --- MIGRATING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/MIGRATING.md b/MIGRATING.md index ad08915e94c..facd8f11fa6 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -6,11 +6,35 @@ 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