Skip to content
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

Avoid posting empty receipts by makingTransactionsManager always use SK1 implementation #2015

Merged
merged 3 commits into from
Nov 2, 2022

Conversation

NachoSoto
Copy link
Contributor

@NachoSoto NachoSoto commented Oct 31, 2022

Fixes CSDK-513.

The SDK still uses SK1 when it comes to fetching receipts to post to the backend.
The SK1 implementation checks whether there are transactions inside of the receipt.

However, this could lead to issues if SK2 has transactions but SK1 doesn't. In those cases, we would end up posting an empty receipt. This PR fixes that.

@NachoSoto NachoSoto added the pr:fix A bug fix label Oct 31, 2022
@NachoSoto NachoSoto requested a review from a team October 31, 2022 17:58
@NachoSoto NachoSoto changed the title TransactionsManager: always use SK1 implementation Avoid posting empty receipts by makingTransactionsManager always use SK1 implementation Oct 31, 2022
Copy link
Member

@aboedo aboedo left a comment

Choose a reason for hiding this comment

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

One small note, ready to go otherwise

Sources/Purchasing/TransactionsManager.swift Outdated Show resolved Hide resolved
Fixes [CSDK-513].

The SDK still uses `SK1` when it comes to fetching receipts to post to the backend.
The `SK1` implementation checks whether there are transactions inside of the receipt.

However, this could lead to issues if `SK2` has transactions but SK1 doesn't. In those cases, we would end up posting an empty receipt.
This fixes that.
@NachoSoto NachoSoto merged commit 038cc24 into main Nov 2, 2022
@NachoSoto NachoSoto deleted the has-transactions-sk2 branch November 2, 2022 15:40
@RCGitBot RCGitBot mentioned this pull request Nov 3, 2022
NachoSoto pushed a commit that referenced this pull request Nov 4, 2022
### New Features
* Introduced `PurchasesDiagnostics` to help diagnose SDK configuration
errors (#1977) via NachoSoto (@NachoSoto)
### Bugfixes
* Avoid posting empty receipts by making`TransactionsManager` always use
`SK1` implementation (#2015) via NachoSoto (@NachoSoto)
* `NetworkOperation`: workaround for iOS 12 crashes (#2008) via
NachoSoto (@NachoSoto)
### Other Changes
* Makes hold job wait for installation tests to pass (#2017) via Cesar
de la Vega (@vegaro)
* Update fastlane-plugin-revenuecat_internal (#2016) via Cesar de la
Vega (@vegaro)
* `bug_report.md`: changed SK2 wording (#2010) via NachoSoto
(@NachoSoto)
* Added `Set + Set` and `Set += Set` operators (#2013) via NachoSoto
(@NachoSoto)
* fix the link to StoreKit Config file from watchOS purchaseTester
(#2009) via Andy Boedo (@aboedo)
* `PurchaseTesterSwiftUI`: combined targets into one multi-platform and
fixed `macOS` (#1996) via NachoSoto (@NachoSoto)
* Less Array() (#2005) via SabinaHuseinova (@SabinaHuseinova)
* Docs: fixed `logIn` references (#2002) via NachoSoto (@NachoSoto)
* CI: use `Xcode 14.1` (#1992) via NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: fixed warnings and simplified code using
`async` methods (#1985) via NachoSoto (@NachoSoto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:fix A bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants