Repository navigation
Add automatic reload type to iOS - #58
Merged
ana-maksimovskikh merged 9 commits intoOct 6, 2026
Merged
ana-maksimovskikh merged 9 commits into
ana-maksimovskikh merged 9 commits into
Conversation
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
August 17, 2026 13:19
e79aaa2 to
be4671d
Compare
ana-maksimovskikh
marked this pull request as ready for review
August 18, 2026 09:41
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
August 18, 2026 15:36
be4671d to
5c54d72
Compare
Max Harrison (maxharrison)
approved these changes
Aug 20, 2026
Max Harrison (maxharrison)
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
August 20, 2026 12:35
8651d0e to
2702de9
Compare
ana-maksimovskikh
changed the base branch from
main
to
ana/apple-pay-fix-recurring-payment-summary-fallback
August 20, 2026 15:39
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
August 20, 2026 16:09
2702de9 to
cf5e728
Compare
Jake Grogan (jakekgrog)
approved these changes
Aug 21, 2026
Base automatically changed from
ana/apple-pay-fix-recurring-payment-summary-fallback
to
main
August 23, 2026 11:35
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
August 23, 2026 11:46
cf5e728 to
3089c77
Compare
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
September 25, 2026 10:26
826e456 to
e167ba5
Compare
Introduces AutomaticReloadPaymentTransaction, keeping automaticReloadBilling as a plain SummaryItem (reconstructed into the real PKAutomaticReloadPaymentSummaryItem where it's actually needed) so the model itself stays iOS-15-safe.
Wires the new transaction type into buildPaymentRequest and getPaymentSummaryItems. .automaticReload is gated to iOS 16+ and can't be named directly in switches that compile at the package's iOS 15 minimum, so those branches fall through a default case; ApplePayTransactionType's initializer now throws EvervaultError.UnsupportedVersionError instead of trapping when it's reached on an unsupported OS.
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
September 25, 2026 11:59
e167ba5 to
dc056ce
Compare
buildPaymentRequest reconstructs a PKAutomaticReloadPaymentSummaryItem and appends it to paymentSummaryItems, but getPaymentSummaryItems's .automaticReload branch only mapped the plain paymentSummaryItems, never reconstructing/appending the reload item. PassKit calls this fallback to rebuild the summary list after shipping, payment-method, or coupon-code changes, so the reload line (and its total) would silently disappear from the sheet on any of those triggers. Factored the reconstruction into a shared buildAutomaticReloadBillingItem helper used by both call sites, so they can't drift apart again.
AutomaticReloadPaymentTransaction exposed shippingMethods and set it on the request in buildPaymentRequest, but getShippingMethods in EvervaultPayment+SwiftUI.swift didn't know about it and returned [] for .automaticReload - so any shipping methods a merchant configured would vanish as soon as the buyer selected or changed a shipping address. Same bug, same fix as #57 (RecurringPaymentTransaction): rather than wiring the second file up to match, remove shippingMethods from the model entirely. Matches the web SDK's stance (CARD-875), which hard-rejects shipping methods on anything but a one-off payment transaction.
ana-maksimovskikh
force-pushed
the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
from
September 25, 2026 12:10
dc056ce to
f728ef1
Compare
getShippingMethodUpdate switches over Transaction to rebuild the summary items list, but its cases predate automaticReload and didn't cover it - switch must be exhaustive, so this failed to compile as soon as the automaticReload case was added to the Transaction enum. Mirrors the recurring/disbursement cases: shipping methods aren't modeled for automatic reload transactions, so this path just forwards the existing summary items unchanged.
ana-maksimovskikh
deleted the
ana/card-1055-e-apple-pay-ios-advanced-request-types-decision-needed
branch
October 6, 2026 11:24
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.
https://linear.app/evervault/issue/CARD-1055/e-apple-pay-ios-advanced-request-types-decision-needed
Tested manually on both simulator and actual device. Also checked behaviour for unsupported iOS versions.
All seems to work ✨
Docs update: https://github.com/evervault/docs/pull/836