-
Notifications
You must be signed in to change notification settings - Fork 9.8k
fix payment discount (iOS Promotional Offers) into being actually usable #6099
fix payment discount (iOS Promotional Offers) into being actually usable #6099
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
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.
Also needs tests
static Future<bool> buyNonConsumableWithDiscount( | ||
{required PurchaseParam purchaseParam, SKPaymentDiscountWrapper? discount}) async { | ||
await _skPaymentQueueWrapper.addPayment(SKPaymentWrapper( |
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.
Why is it a static method while it is using an instance variable?
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 would imagine the discount can be part of the PurchaseParam
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.
@cyanglaz the instance variable is also static. I agree it is not the best option. I merely wanted a working solution to open a pull request with. Then have a discussion about how to resolve it, or have it resolved by someone from the maintainers.
If it's part of PurchaseParam, this method would not be needed at all but I presume there should be also Android counterpart . In the original Pull request I saw only iOS implementation. I don't know how the Android offers work (if there are any).
Thanks for the contribution! You’ve checked boxes in the PR checklist above that are not reflected in this PR, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the checklist, updating the PR as appropriate, and when the checklist reflects the state of the PR as posted please feel free to mark it as ready for review. Also, it would be helpful if you could provide more information in the issue about what exactly you were doing and what didn't work; it just asserts that the feature doesn't work without much detail, which makes it hard to evaluate. |
@stuartmorgan indeed it's work in progress. About missing details, will this be helpful enough:
and if so, do you need it posted in the original issue body text? |
Since this is marked as a draft and hasn't been updated in several months I'm going to close it to clean out our review queue. Please don't hesitate to submit a new PR if you decide to revisit this. Thanks! |
@stuartmorgan I've opened another PR here which isn't a draft. Hopefully it will be more useful than this one. |
Make iOS Promotional Offers in in_app_purchase plugin usable
Resolves: [in-app-purchase][iOS] Promotional Offers in iOS not working
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style].///
).