Skip to content

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

Merged
NachoSoto merged 3 commits into
mainfrom
has-transactions-sk2
Nov 2, 2022
Merged

Avoid posting empty receipts by makingTransactionsManager always use SK1 implementation#2015
NachoSoto merged 3 commits into
mainfrom
has-transactions-sk2

Conversation

@NachoSoto

@NachoSoto NachoSoto commented Oct 31, 2022

Copy link
Copy Markdown
Contributor

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

@aboedo aboedo left a comment

Copy link
Copy Markdown
Member

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

Comment thread Sources/Purchasing/TransactionsManager.swift Outdated
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 force-pushed the has-transactions-sk2 branch from bfc285c to 05e8910 Compare November 2, 2022 15:39
@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