Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[in_app_purchase] Adds Dart BillingClient APIs for loading purchases #1286

Merged
merged 2 commits into from
Mar 7, 2019
Merged

[in_app_purchase] Adds Dart BillingClient APIs for loading purchases #1286

merged 2 commits into from
Mar 7, 2019

Conversation

mklim
Copy link
Contributor

@mklim mklim commented Feb 26, 2019

  1. Wires the Purchase data class and serializers in to Dart.
  2. BillingClient now requires a callback for responding to purchase
    updates to be passed in at construction time.
  3. Exposes BillingClient#queryPurchases and
    BillingClient#queryPurchaseHistory.

For now GooglePlayConnection passes in a lambda that does nothing to
BillingClient. This will need to be fixed when all the connections are
updated.

@mklim mklim requested a review from cyanglaz February 26, 2019 22:29
Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good overall, left some comments.

final BillingResponse responseCode;

/// The list of succesful purchases made in this transaction. May be
/// empty, especially if [responseCode] is not [BillingResponse.ok].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be empty in other scenarios?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know of any, but I don't want to definitively claim this in case there's edge cases I'm not aware of.

Michael Klimushyn added 2 commits March 1, 2019 13:46
1. Wires the Purchase data class and serializes in to Dart.
2. BillingClient now required a callback for responding to Purchase
   updates to be passed in at construction time.
3. Exposes `BillingClient#queryPurchases` and
   `BillingClient#queryPurchaseHistory`.

For now GooglePlayConnection passes in a lambda that does nothing to
`BillingClient`. This will need to be fixed when all the collections are
updated.
@mklim mklim merged commit 6d7b459 into flutter:master Mar 7, 2019
@mklim mklim deleted the iap_dart_purchases_updated branch March 7, 2019 18:57
jonasbark pushed a commit to jonasbark/plugins that referenced this pull request Mar 11, 2019
* commit '9017d6e7f867af278edd7e8e584d52524f37443f': (408 commits)
  [webview_flutter]Allow specifying a navigation delegate(Android and Dart). (flutter#1236)
  Allow specifying a navigation delegate (iOS implementation). (flutter#1323)
  Change build link in contributors site to cirrus (flutter#1327)
  [image_picker] Update versioning for flutter#1268 (flutter#1326)
  [image_picker] remove unnecessary camera permmision (flutter#1268)
  Exclude longPress from semantics (flutter#1324)
  [in_app_purchase] refactoring and tests (flutter#1322)
  [in_app_purchase] Adds Dart BillingClient APIs for loading purchases (flutter#1286)
  [connectivity] Update README.md (flutter#1201)
  [camera] Fixes #28350 (flutter#1261)
  [cloud_functions] Specify version for CocoaPod and handle null regions gracefully (flutter#1316)
  [in_app_purchase]retrieve receipt (flutter#1303)
  [firebase_analytics] Add resetAnalyticsData method (flutter#1311)
  trackCameraPosition is inferred from GoogleMap.onCameraMove (flutter#1314)
  [google_maps_flutter]ChangeNotifier is replaced with granular callbacks (flutter#1302)
  [video_player]Do not divide by zero (flutter#793)
  [firebase_dynamic_links] Version bump for firebase_dynamic_links PR flutter#1142 (flutter#1309)
  [firebase_dynamic_links] fix dynamic link crash when creating shortlink if warnings are null (flutter#1142)
  Fix typo in RewardedVideoAdd sample (flutter#927)
  Add my name to firebase_performance and firebase_dynamic_links owners (flutter#1300)
  ...

# Conflicts:
#	packages/camera/android/src/main/java/io/flutter/plugins/camera/CameraPlugin.java
#	packages/camera/ios/Classes/CameraPlugin.m
#	packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m
#	packages/image_picker/android/build.gradle
#	packages/video_player/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants