Skip to content

Fix missing purchase/restore completion callbacks in proxy paywall path#750

Draft
facumenzella wants to merge 3 commits intomainfrom
fix/proxy-delegate-missing-callbacks
Draft

Fix missing purchase/restore completion callbacks in proxy paywall path#750
facumenzella wants to merge 3 commits intomainfrom
fix/proxy-delegate-missing-callbacks

Conversation

@facumenzella
Copy link
Copy Markdown
Member

@facumenzella facumenzella commented Mar 17, 2026

Summary

  • Fixes dismissRequest call before onPurchaseCompleted #736dismissRequest was called but onPurchaseCompleted never fired on non-footer paywalls
  • IosPaywallProxyDelegate was missing didFinishPurchasingWith and didFinishRestoringWith delegate method implementations from the DelegateWrapperProtocol
  • Added buildCustomerInfo() to parse PHC dictionary format back into CustomerInfo model (needed because the proxy path uses dictionary-based protocol, not typed)
  • Also fixes onRestoreCompleted which had the same issue

Test plan

  • Verify onPurchaseCompleted fires before dismissRequest on non-footer paywalls
  • Verify onRestoreCompleted fires on non-footer paywalls
  • Verify footer paywalls still work correctly (uses separate typed delegate path)
  • Unit tests for buildCustomerInfo dictionary parsing cover full map, minimal map, missing fields, and enum parsing
  • CI passes

🤖 Generated with Claude Code

…roxy paywall path

The IosPaywallProxyDelegate (used for non-footer paywalls) was missing implementations
for didFinishPurchasingWith and didFinishRestoringWith from the DelegateWrapperProtocol.
This caused onPurchaseCompleted to never fire and onRestoreCompleted to never fire through
the proxy path, while dismissRequest still fired on purchase success — making it impossible
for developers to control paywall dismissal after a purchase.

Adds buildCustomerInfo() to parse PHC dictionary format back to CustomerInfo model,
along with comprehensive tests and an API test.

Fixes #736

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@facumenzella facumenzella added the pr:fix A bug fix label Mar 17, 2026
facumenzella and others added 2 commits March 25, 2026 09:11
…wallowing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

dismissRequest call before onPurchaseCompleted

1 participant