Fix missing regular/trial billing line items in recurring payment fallback - #67
Closed
ana-maksimovskikh wants to merge 1 commit into
Closed
Fix missing regular/trial billing line items in recurring payment fallback#67ana-maksimovskikh wants to merge 1 commit into
ana-maksimovskikh wants to merge 1 commit into
Conversation
buildPaymentRequest(transaction: RecurringPaymentTransaction) appends regularBilling (and trialBilling, if set) to paymentSummaryItems, but getPaymentSummaryItems's .recurringPayment branch only mapped the plain paymentSummaryItems, never appending them. PassKit calls this fallback to rebuild the summary list after shipping, payment-method, or coupon-code changes, so the subscription's billing line (and any trial line) would silently disappear from the sheet on any of those triggers - same class of bug as the automaticReload fallback fixed in PR #58. Also generalized makeViewForDispositionTests to accept an arbitrary Transaction, mirroring the same test-helper change from PR #58, so this and future fallback regression tests aren't limited to oneOffPayment. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ana-maksimovskikh
deleted the
ana/card-fix-recurring-payment-summary-fallback
branch
August 20, 2026 13:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
`getPaymentSummaryItems()`'s `.recurringPayment` branch only mapped the plain `paymentSummaryItems`, never appending `regularBilling` (or `trialBilling`, when set) — even though `buildPaymentRequest(transaction: RecurringPaymentTransaction)` appends both when constructing the request. PassKit calls this fallback to rebuild the summary list after shipping, payment-method, or coupon-code changes, so the subscription's billing line (and trial line) would silently disappear from the sheet on any of those triggers.
Same class of bug as the automaticReload fallback fixed in #58 (
c54e8c3).Why here, not in #58/#65
This bug is in code that shipped to
mainin #57, unrelated to the automaticReload/deferred-payment work in #58/#65. Landing it as its own PR againstmainlets both of those stacked PRs rebase on top and inherit the fix without duplicating it.Changes
getPaymentSummaryItems()'s.recurringPaymentbranch.makeViewForDispositionTeststo accept an arbitraryTransaction(shared test infra also needed by Add automatic reload type to iOS #58's automaticReload fix — extracted here so Add automatic reload type to iOS #58 no longer needs to redo it).Testing
swift buildclean at iOS 15 floor.xcodebuild testsuite: 40/40 passing (up from 38, +2 new regression tests) on top ofmain.🤖 Generated with Claude Code