-
Notifications
You must be signed in to change notification settings - Fork 22
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
Subscription Support #11
Conversation
pubspec.yaml
Outdated
@@ -1,6 +1,7 @@ | |||
name: flutter_billing | |||
description: A flutter plugin to communicate with billing on iOS and Android. | |||
version: 0.2.3 | |||
version: 0.2.4 |
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.
There is release.md once merged in I will do release update. Please exclude this change from this commit.
lib/flutter_billing.dart
Outdated
@@ -37,6 +39,9 @@ class BillingProduct { | |||
/// Price in 100s. e.g. $2.49 equals 249. | |||
final int amount; | |||
|
|||
// Type of product. e.g. SUBS or INAPP | |||
final String type; |
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.
Prefer to use enum instead
final List<Map<String, Object>> products = new ArrayList<>(); | ||
|
||
for (SkuDetails details : skuDetailsList) { | ||
final Map<String, Object> product = new HashMap<>(); |
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 section seems to be duplicated code, let's have some private function that maps details to a HashMap and use it here and in original function for products fetching
final Purchase.PurchasesResult subscriptionResult = billingClient.queryPurchases(SkuType.SUBS); | ||
final int subscriptionResponseCode = subscriptionResult.getResponseCode(); | ||
|
||
if (productResponseCode == BillingResponse.OK) { |
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.
Consider error case, there should be single if
condition checking BillingResponse.OK
for both products and subscriptions, otherwise error.
Thank you for your contribution! |
LGTM! Can you please squash your commits into single final one with description and I will merge. Thank you. |
Hi,
Sorry to be a bother. I am trying to squash my commits but I am running
into issues. I attempted a normal squash using 'git rebase -i HEAD~2'
which gave me an error. I followed some instructions I found online for a
workaround and it now looks like I have additional commits now instead of
just one. Do you know how I can fix this? I have not squashed commits
before and the way I tried did not do what I expected.
Thanks,
-Zack
…On Mon, Aug 13, 2018 at 9:39 AM Volodymyr Lykhonis ***@***.***> wrote:
LGTM! Can you please squash your commits into single final one with
description and I will merge. Thank you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFrrdfHd6pxnyRjuXJlLwSUn0z1pvegJks5uQavIgaJpZM4VuysJ>
.
--
Thank you!
Zack Lore
zacktron@gmail.com
cell - (509) 200-9018
|
I think you can do
Git rebase -i master~3
Git push --force
…On Wed, Aug 15, 2018, 6:23 PM zack lore ***@***.***> wrote:
Hi,
Sorry to be a bother. I am trying to squash my commits but I am running
into issues. I attempted a normal squash using 'git rebase -i HEAD~2'
which gave me an error. I followed some instructions I found online for a
workaround and it now looks like I have additional commits now instead of
just one. Do you know how I can fix this? I have not squashed commits
before and the way I tried did not do what I expected.
Thanks,
-Zack
On Mon, Aug 13, 2018 at 9:39 AM Volodymyr Lykhonis <
***@***.***>
wrote:
> LGTM! Can you please squash your commits into single final one with
> description and I will merge. Thank you.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <
#11 (comment)
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AFrrdfHd6pxnyRjuXJlLwSUn0z1pvegJks5uQavIgaJpZM4VuysJ
>
> .
>
--
Thank you!
Zack Lore
***@***.***
cell - (509) 200-9018
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA1yurBPwCYCIWxEqL5YmY1HEA3ucn2Rks5uRMmYgaJpZM4VuysJ>
.
|
Whew! I think I got it... let me know if that looks good to you. Thanks
for your help.
…-Zack
On Wed, Aug 15, 2018 at 7:07 PM Volodymyr Lykhonis <notifications@github.com>
wrote:
I think you can do
Git rebase -i master~3
Git push --force
On Wed, Aug 15, 2018, 6:23 PM zack lore ***@***.***> wrote:
> Hi,
>
> Sorry to be a bother. I am trying to squash my commits but I am running
> into issues. I attempted a normal squash using 'git rebase -i HEAD~2'
> which gave me an error. I followed some instructions I found online for a
> workaround and it now looks like I have additional commits now instead of
> just one. Do you know how I can fix this? I have not squashed commits
> before and the way I tried did not do what I expected.
>
> Thanks,
> -Zack
>
> On Mon, Aug 13, 2018 at 9:39 AM Volodymyr Lykhonis <
> ***@***.***>
> wrote:
>
> > LGTM! Can you please squash your commits into single final one with
> > description and I will merge. Thank you.
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub
> > <
>
#11 (comment)
> >,
> > or mute the thread
> > <
>
https://github.com/notifications/unsubscribe-auth/AFrrdfHd6pxnyRjuXJlLwSUn0z1pvegJks5uQavIgaJpZM4VuysJ
> >
> > .
> >
>
>
> --
> Thank you!
>
> Zack Lore
> ***@***.***
> cell - (509) 200-9018
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#11 (comment)
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AA1yurBPwCYCIWxEqL5YmY1HEA3ucn2Rks5uRMmYgaJpZM4VuysJ
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFrrdaEZ1D-m_CzI-hAzrk7r7h9EjLa0ks5uRNPWgaJpZM4VuysJ>
.
--
Thank you!
Zack Lore
zacktron@gmail.com
cell - (509) 200-9018
|
Need to resolve conflicts before I can merge |
Conflicts are resolved.
…On Sat, Aug 18, 2018 at 7:48 AM Volodymyr Lykhonis ***@***.***> wrote:
Need to resolve conflicts before I can merge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFrrdcC7djzYXbGP5yqU8qkBxvSETFpOks5uSCkngaJpZM4VuysJ>
.
--
Thank you!
Zack Lore
zacktron@gmail.com
cell - (509) 200-9018
|
I added some changes to add subscription support for Android. I built a test app and have tested the subscriptions successfully.