Add automatic reload type to iOS - #58
Open
ana-maksimovskikh wants to merge 8 commits into
Open
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
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.
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. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
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