Skip to content

Commit

Permalink
Add migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkoop committed Oct 9, 2023
1 parent e69e5db commit b42422b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Remove `union-pay` module
* UnionPay cards can now be processed as regular cards (through the `card` module) due to their partnership with Discover
* BraintreeDataCollector
* Remove module (use PayPalDataCollector)
* Remove `data-collector` module (use `paypal-data-collector`)
* PayPalDataCollector
* Rename `PayPalDataCollector` to `DataCollector`
* Rename `PayPalDataCollectorRequest` to `DataCollectorRequest`
Expand Down
20 changes: 19 additions & 1 deletion v5_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,30 @@ See the [CHANGELOG](/CHANGELOG.md) for a complete list of changes. This migratio
## Table of Contents

1. [Android API](#android-api)
1. [Data Collector](#data-collector)
1. [Union Pay](#union-pay)

## Android API

The minimum supported Android API level for v5 of this SDK has increased to 23.


## Data Collector

The `data-collector` module has been removed and replaced by the `paypal-data-collector` module.
The `DataCollector` class within the `paypal-data-collector` module has the same
`collectDeviceData` methods, so if you were previously using the `data-collector` library, no code
changes are required aside from updating your dependency.

If you were using the `paypal-data-collector` library in v4, the `PayPal` prefix has been
removed from all class names in v5.

```kotlin
val dataCollector = DataCollector(braintreeClient)
dataCollector.collectDeviceData(context) { deviceData, error ->
// send deviceData to your server
}
```

## Union Pay

The `union-pay` module, and all containing classes, was removed in v5. UnionPay cards can now be processed as regular cards, through the `card` module. You no longer need to manage card enrollment via SMS authorization.
Expand Down

0 comments on commit b42422b

Please sign in to comment.