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

Remove Stripe.createToken() #2878

Merged
merged 2 commits into from
Sep 21, 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ This release adds support for 19-digit cards in `CardInputWidget` and `CardMulti
* Upgrade `com.nimbusds:nimbus-jose-jwt` to `9.0.1`
* Guard against crash when `TransactionTimer` is unavailable
* [#2873](https://github.com/stripe/stripe-android/pull/2873) Fix `CardInputWidget` field rendering in RTL
* [#2873](https://github.com/stripe/stripe-android/pull/2878) Remove `Stripe.createToken()`

## 15.1.0 - 2020-08-13
## 15.1.0 - 2020-08-13
* [#2671](https://github.com/stripe/stripe-android/pull/2671) Add `cardParams` property to `CardInputWidget` and `CardMultilineWidget`
* [#2675](https://github.com/stripe/stripe-android/pull/2675) Add `CardParams` methods to `Stripe`
* [#2677](https://github.com/stripe/stripe-android/pull/2677) Deprecate `Card.create()`
Expand Down
1 change: 1 addition & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
- Changes to `Stripe`
- `createCardParams()` that accepts a `Card` parameter is deprecated.
Use `createCardParams()` that accepts a `CardParams` parameter instead.
- `createToken()` has been removed; use `createCardToken()` instead.

## Migrating from versions < 15.0.0
- The SDK now targets JVM 1.8
Expand Down
28 changes: 0 additions & 28 deletions stripe/src/main/java/com/stripe/android/Stripe.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1248,34 +1248,6 @@ class Stripe internal constructor(
)
}

/**
* Create a Card token asynchronously.
*
* See [Create a card token](https://stripe.com/docs/api/tokens/create_card).
* `POST /v1/tokens`
*
* @param card the [Card] used to create this payment token
* @param idempotencyKey optional, see [Idempotent Requests](https://stripe.com/docs/api/idempotent_requests)
* @param callback a [ApiResultCallback] to receive the result or error
*/
@Deprecated(
"Deprecated, replace with Stripe#createCardToken()",
ReplaceWith("createCardToken(card, idempotencyKey, callback)")
)
@UiThread
@JvmOverloads
fun createToken(
card: Card,
idempotencyKey: String? = null,
callback: ApiResultCallback<Token>
) {
createCardToken(
card,
idempotencyKey = idempotencyKey,
callback = callback
)
}

/**
* Create a Card token asynchronously.
*
Expand Down