-
Notifications
You must be signed in to change notification settings - Fork 177
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
Crash on Amazon paywalls after purchasing #1053
Conversation
Generated by 🚫 Danger |
lib/models/store_transaction.dart
Outdated
@Deprecated('Use orderId instead.') | ||
/// RevenueCat Id associated to the transaction. | ||
@Default('') String transactionIdentifier, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be made optional in order to have a default, which it actually makes it a breaking change
1839bd1
to
ec6b4f3
Compare
fe066d9
to
aed64da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this!
**This is an automatic release.** ### Bugfixes * Crash on Amazon paywalls after purchasing (#1053) via Cesar de la Vega (@vegaro) ### Dependency Updates * BillingClient has been updated to version 6.2.1 * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.6.1 (#1059) via RevenueCat Git Bot (@RCGitBot) * [Android 7.10.1](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.1) * [Android 7.10.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.0) * [iOS 4.41.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.2) * [iOS 4.41.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.1) * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.6.0 (#1056) via RevenueCat Git Bot (@RCGitBot) * [Android 7.10.1](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.1) * [Android 7.10.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.0) * [iOS 4.41.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.2) * [iOS 4.41.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.1) * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.5.1 (#1054) via RevenueCat Git Bot (@RCGitBot) * [Android 7.10.1](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.1) * [Android 7.10.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.0) * [iOS 4.41.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.2) * [iOS 4.41.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.1) ### Other Changes * Add `trigger_bump` lane (#1058) via Cesar de la Vega (@vegaro) --------- Co-authored-by: Cesar de la Vega <[email protected]>
In `PurchaseCompleted` we are passing a Flutter's `StoreTransaction` in the callback. This is very confusing but: - In Android `StoreTransaction` is what's returned after a successful purchase. This class has a nullable `orderId` - In Android `Transaction` is the transactions in the CustomerInfo. This class has a non-nullable `transactionIdentifier` The issue we are having is that in Flutter we only have one `StoreTransaction` with a non-nullable `transactionId`, and we are using it in both places, the `PurchaseCompleted` and `CustomerInfo`. I see several ways of fixing this: - Making transactionIdentifier nullable. I don’t like this. It’s breaking - Making transactionIdentifier an empty string. Fixing it in next major - Making transactionIdentifier an empty string, deprecating it and creating orderId which is nullable and the same as transactionIdentifier. We’ll have nullable orderIds in the customer info transactions where this object is also used. In Android we have two classes, one for CustomerInfo transactions (Transaction with non-nullable transactionId ) and StoreTransaction which is used for completed purchases - Making a copy of StoreTransaction and name it CompletedPurchase , but with a nullable transactionIdentifier. Also breaking since we need to modify the PurchaseCompleted callback to receive this object. Making a new callback won’t work because the broken `PurchaseCompleted will keep crashing. In this PR I am doing number 2, since it's the least breaking. This only affects apps using Amazon paywalls, which is not many. Will fix RevenueCat#1049
**This is an automatic release.** ### Bugfixes * Crash on Amazon paywalls after purchasing (RevenueCat#1053) via Cesar de la Vega (@vegaro) ### Dependency Updates * BillingClient has been updated to version 6.2.1 * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.6.1 (RevenueCat#1059) via RevenueCat Git Bot (@RCGitBot) * [Android 7.10.1](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.1) * [Android 7.10.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.0) * [iOS 4.41.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.2) * [iOS 4.41.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.1) * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.6.0 (RevenueCat#1056) via RevenueCat Git Bot (@RCGitBot) * [Android 7.10.1](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.1) * [Android 7.10.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.0) * [iOS 4.41.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.2) * [iOS 4.41.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.1) * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.5.1 (RevenueCat#1054) via RevenueCat Git Bot (@RCGitBot) * [Android 7.10.1](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.1) * [Android 7.10.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.10.0) * [iOS 4.41.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.2) * [iOS 4.41.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.41.1) ### Other Changes * Add `trigger_bump` lane (RevenueCat#1058) via Cesar de la Vega (@vegaro) --------- Co-authored-by: Cesar de la Vega <[email protected]>
In
PurchaseCompleted
we are passing a Flutter'sStoreTransaction
in the callback. This is very confusing but:StoreTransaction
is what's returned after a successful purchase. This class has a nullableorderId
Transaction
is the transactions in the CustomerInfo. This class has a non-nullabletransactionIdentifier
The issue we are having is that in Flutter we only have one
StoreTransaction
with a non-nullabletransactionId
, and we are using it in both places, thePurchaseCompleted
andCustomerInfo
.I see several ways of fixing this:
In this PR I am doing number 2, since it's the least breaking. This only affects apps using Amazon paywalls, which is not many.
Will fix #1049