-
Notifications
You must be signed in to change notification settings - Fork 233
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
Upgrade to billing 5.1 (reverse compatible) #392
Conversation
…s and pricing phases Reverse compatible with billing 4.0 items that have been auto migrated to 5.0 Fixed some warnings
Fix issue where "default" price was a subscription offer instead of the base plan
Codecov Report
@@ Coverage Diff @@
## main #392 +/- ##
==========================================
+ Coverage 42.18% 47.69% +5.51%
==========================================
Files 4 4
Lines 467 478 +11
==========================================
+ Hits 197 228 +31
+ Misses 270 250 -20
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@nizwar gotcha, I didn't manually re-test all the methods I didn't modify but that error makes sense to me, I'll try and fix it today and do a bit more hands-on testing |
…equired offerToken parameter needed for billing 5.0 product purchase on Android.
Any chance we can get a timeline on this? Would be great to be able to not have to use a forked plugin in production |
@hyochan what's missing for this to be merged in? We've been using it in production for over a month without issue. |
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.
Looks good, would be nice to merge it =)
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.
I apologize for the delay in providing a review, but I wanted to express my gratitude for your excellent work. I did have some questions, but it appears that others have already tested and reviewed your PR, so I will merge my feedback.
Thanks again for your contribution 👍
// expect(product.subscriptionPeriodAndroid, | ||
// expectedProduct.subscriptionPeriodAndroid); | ||
// expect(product.introductoryPriceCyclesAndroid, | ||
// expectedProduct.introductoryPriceCyclesAndroid); | ||
// expect(product.introductoryPricePeriodAndroid, | ||
// expectedProduct.introductoryPricePeriodAndroid); | ||
// expect(product.freeTrialPeriodAndroid, | ||
// expectedProduct.freeTrialPeriodAndroid); |
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.
Is this bing deprecated?
http.Client mockClient = MockClient((request) async { | ||
return Response(json.encode({'status': 0}), 200); | ||
}); |
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.
Is mocking not working or the validation functionality is gone?
expect(product.introductoryPriceCyclesAndroid, | ||
expectedProduct.introductoryPriceCyclesAndroid); | ||
expect(product.introductoryPricePeriodAndroid, | ||
expectedProduct.introductoryPricePeriodAndroid); | ||
expect(product.freeTrialPeriodAndroid, | ||
expectedProduct.freeTrialPeriodAndroid); |
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.
Are they being deprecated 🧐?
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.
They have been deprecated yes, these were essentially a way to make it look like an ios purchase but it's changed too much under the hood to be functional with the new Android billing
@SamBergeron @xPutnikx @nizwar shipped as |
@SamBergeron Is this still the reason why I can't see my price after upgrading to 5.4.0? I get (No subscription, just a single in-app product.) |
By the way, small error, |
This is build off of @youssefali424 hyochan#387 PR because that one had a couple issues. It didn't pass back the prices properly for items that were created in android billing 4.0 amongst other issues. I created two new dart objects that reflect android 5.0 billing objects `SubscriptionOffer` and `PricingPhase` that pass back all the information associated with a play store item, so you can navigate those to extract introductory offers and discounted subscriptions as opposed to just having a single offer price. I've also kept the `price`, `currency` and `localizedPrice` values and made them backwards compatible with items that were updated from billing 4.0 if your app relies on those (ours did) ~~Note that the tests fail because of ios and android receipt validation only, which appears to not point to a valid URL anymore.~~
This is build off of @youssefali424 #387 PR because that one had a couple issues. It didn't pass back the prices properly for items that were created in android billing 4.0 amongst other issues.
I created two new dart objects that reflect android 5.0 billing objects
SubscriptionOffer
andPricingPhase
that pass back all the information associated with a play store item, so you can navigate those to extract introductory offers and discounted subscriptions as opposed to just having a single offer price.I've also kept the
price
,currency
andlocalizedPrice
values and made them backwards compatible with items that were updated from billing 4.0 if your app relies on those (ours did)Note that the tests fail because of ios and android receipt validation only, which appears to not point to a valid URL anymore.All tests are passing and extra code coverage has been added