Fix V4 Apple Pay button customization API#321
Merged
Conversation
markmur
approved these changes
Jun 23, 2026
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?
Ports the relevant Apple Pay customization fix from the legacy V3 checkout sheet kit into the V4 Swift SDK.
.applePayButtonType(_:).applePayButtonStyle(_:)PKPaymentButtonType/PKPaymentButtonStyledirectly through the Apple Pay button stack.PKPaymentButton.Why?
The V3 patch needed backwards-compatible shims for deprecated Apple Pay customization APIs. V4 does not need that compatibility layer, so this keeps only the V4-relevant fix: using native PassKit values directly and ensuring the button identity reflects both style and type.
Validation
shadowenv exec -- env CURRENT_SIMULATOR_UUID=E8D7913B-0229-4D36-9B22-455726BEDA9E /opt/dev/bin/dev swift test ApplePayButtonCustomizationTestsshadowenv exec -- /opt/dev/bin/dev swift api checkshadowenv exec -- /opt/dev/bin/dev swift lintshadowenv exec -- env CURRENT_SIMULATOR_UUID=E8D7913B-0229-4D36-9B22-455726BEDA9E /opt/dev/bin/dev swift testshadowenv exec -- env CURRENT_SIMULATOR_UUID=E8D7913B-0229-4D36-9B22-455726BEDA9E /opt/dev/bin/dev swift build packagesagent-device: built and installedCheckoutKitSwiftDemo.app, opened first product, verified enabled/hittableBuy with Apple Paybutton rendered.Smoke screenshot saved locally at
/tmp/checkout-kit-agent-device/v4-checkoutkit-demo-apple-pay-product.png.