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

Integrate confirm entitlements endpoint #2541

Merged
merged 10 commits into from
Mar 6, 2024
Merged

Conversation

miasma13
Copy link
Contributor

@miasma13 miasma13 commented Mar 6, 2024

Task/Issue URL: https://app.asana.com/0/0/1206498134325582/f

Description:
Integrate confirm entitlements endpoint for macOS App Store purchase with additional retries in case of failure.

Steps to test this PR:

Success scenario:

  1. Build the app
  2. Start the subscription purchase.
  3. When the App Store payment goes through with "You are all set" confirmation observe the logs:
  • call to purchase confirmation endpoint should be made returning the subscription and entitlement info instead of polling

Failure scenario:

  1. Open SubscriptionPagesUseSubscriptionFeature.swift
  2. Modify AppStorePurchaseFlow.completeSubscriptionPurchase(with: purchaseTransactionJWS) into AppStorePurchaseFlow.completeSubscriptionPurchase(with: "") to make the confirmation fail.
  3. Redo the steps from the success scenario.
  4. Observe the logs
  • call to purchase confirmation endpoint should be retried 3x with 0.5s intervals

Device Testing:

  • iPhone
  • iPad

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16

Internal references:

Software Engineering Expectations
Technical Design Template

@miasma13 miasma13 requested a review from afterxleep March 6, 2024 09:45
@miasma13 miasma13 marked this pull request as ready for review March 6, 2024 09:46
@miasma13 miasma13 merged commit d6b7c97 into main Mar 6, 2024
13 checks passed
@miasma13 miasma13 deleted the michal/subs-confirm-endpoint branch March 6, 2024 15:27
samsymons added a commit that referenced this pull request Mar 6, 2024
# By Daniel Bernal (3) and others
# Via GitHub
* main:
  fix opening tabs with transitional (#2542)
  Integrate confirm entitlements endpoint (#2541)
  Makes dbSaveBloomFilterError daily and count (#2526)
  16. Subscription: Display "Activation in progress" message (#2535)
  Autofill support for deleting all passwords  (#2497)
  Bump BrowserServicesKit (#2532)
  Release 7.111.0-0 (#2534)
  if dax dialogs are showing then dismiss (#2506)
  Remove local BSK reference (#2529)
  15. Subscription sign-out notification observers and Design Feedback (#2528)
  Upgrade to Xcode 15.2 (#2517)
  Report Apple Ad attribution using pixel (#2510)
  15. Subscriptions: Properly sign out users and cache state (#2520)
  Check entitlement periodically and while rekeying NetP (#2461)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
samsymons added a commit that referenced this pull request Mar 8, 2024
* main:
  Point to BSK hotfix (#2558)
  Prevent redeeming invite codes after the VPN test ends (#2559)
  Updates Kingfisher to 7.11.0 (#2545)
  Makes network path metadata description anonymous (#2544)
  Adds pixels to track main VPN funnels (#2543)
  Cleanup after rolling out autoconsent enabled by default (#2537)
  Add #URL macro (#2540)
  Handle expired entitlement in NetP (#2525)
  Remove isSubscriptionEnabled check when attempting to delete NetP token (#2548)
  Validate correct environment (#2546)
  Remove CGNAT range (#2524)
  Add preliminary support for subscription keychain sharing (#2538)
  fix opening tabs with transitional (#2542)
  Integrate confirm entitlements endpoint (#2541)
  Makes dbSaveBloomFilterError daily and count (#2526)
  16. Subscription: Display "Activation in progress" message (#2535)
  Autofill support for deleting all passwords  (#2497)
  Bump BrowserServicesKit (#2532)
  Release 7.111.0-0 (#2534)
  if dax dialogs are showing then dismiss (#2506)
samsymons added a commit that referenced this pull request Mar 8, 2024
…-lottie-animation

* sam/vpn-ui-improvements:
  Point to BSK hotfix (#2558)
  Prevent redeeming invite codes after the VPN test ends (#2559)
  Updates Kingfisher to 7.11.0 (#2545)
  Makes network path metadata description anonymous (#2544)
  Adds pixels to track main VPN funnels (#2543)
  Cleanup after rolling out autoconsent enabled by default (#2537)
  Add #URL macro (#2540)
  Handle expired entitlement in NetP (#2525)
  Remove isSubscriptionEnabled check when attempting to delete NetP token (#2548)
  Validate correct environment (#2546)
  Remove CGNAT range (#2524)
  Add preliminary support for subscription keychain sharing (#2538)
  fix opening tabs with transitional (#2542)
  Integrate confirm entitlements endpoint (#2541)
  Makes dbSaveBloomFilterError daily and count (#2526)
  16. Subscription: Display "Activation in progress" message (#2535)
  Autofill support for deleting all passwords  (#2497)
  Bump BrowserServicesKit (#2532)
  Release 7.111.0-0 (#2534)
  if dax dialogs are showing then dismiss (#2506)
samsymons added a commit that referenced this pull request Mar 8, 2024
…n-ui-improvements-3-combine-notification-settings

* sam/vpn-ui-improvements-2-lottie-animation: (22 commits)
  Point to BSK hotfix (#2558)
  Prevent redeeming invite codes after the VPN test ends (#2559)
  Updates Kingfisher to 7.11.0 (#2545)
  Makes network path metadata description anonymous (#2544)
  Adds pixels to track main VPN funnels (#2543)
  Cleanup after rolling out autoconsent enabled by default (#2537)
  Add #URL macro (#2540)
  Handle expired entitlement in NetP (#2525)
  Remove isSubscriptionEnabled check when attempting to delete NetP token (#2548)
  Add dark mode animation.
  Allow the animation intro to be skipped
  Validate correct environment (#2546)
  Remove CGNAT range (#2524)
  Add preliminary support for subscription keychain sharing (#2538)
  fix opening tabs with transitional (#2542)
  Integrate confirm entitlements endpoint (#2541)
  Makes dbSaveBloomFilterError daily and count (#2526)
  16. Subscription: Display "Activation in progress" message (#2535)
  Autofill support for deleting all passwords  (#2497)
  Bump BrowserServicesKit (#2532)
  ...
samsymons added a commit that referenced this pull request Mar 8, 2024
…' into sam/vpn-ui-improvements-4-location-setting-change

# By Sam Symons (4) and others
# Via Sam Symons (3) and others
* sam/vpn-ui-improvements-3-combine-notification-settings: (22 commits)
  Point to BSK hotfix (#2558)
  Prevent redeeming invite codes after the VPN test ends (#2559)
  Updates Kingfisher to 7.11.0 (#2545)
  Makes network path metadata description anonymous (#2544)
  Adds pixels to track main VPN funnels (#2543)
  Cleanup after rolling out autoconsent enabled by default (#2537)
  Add #URL macro (#2540)
  Handle expired entitlement in NetP (#2525)
  Remove isSubscriptionEnabled check when attempting to delete NetP token (#2548)
  Add dark mode animation.
  Allow the animation intro to be skipped
  Validate correct environment (#2546)
  Remove CGNAT range (#2524)
  Add preliminary support for subscription keychain sharing (#2538)
  fix opening tabs with transitional (#2542)
  Integrate confirm entitlements endpoint (#2541)
  Makes dbSaveBloomFilterError daily and count (#2526)
  16. Subscription: Display "Activation in progress" message (#2535)
  Autofill support for deleting all passwords  (#2497)
  Bump BrowserServicesKit (#2532)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants