Repository navigation
feat: payment method overrides for dc - #284
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues were identified in the scoped presentation changes, which preserve payment identifiers and existing fallbacks.
No open issues 🎉
What changed in this PR
Adds merchant-configurable payment method names and logos to Dynamic Checkout while preserving payment identifiers and routing.
Changes:
- Adds validated
paymentMethodsOverridesconfiguration with display fallbacks. - Applies overrides across card, APM, native APM, and saved APM interfaces.
- Adds configuration tests and bumps the version to 1.9.17.
| File | Description |
|---|---|
| test/dynamic-checkout/payment-method-overrides.test.ts | Tests validation, fallback, and immutability. |
| src/dynamic-checkout/payment-methods/saved-apm.ts | Overrides saved APM labels and logos. |
| src/dynamic-checkout/payment-methods/native-apm.ts | Overrides native APM button presentation. |
| src/dynamic-checkout/payment-methods/card.ts | Overrides card button presentation. |
| src/dynamic-checkout/payment-methods/apm.ts | Overrides APM labels and button/action-handler logos. |
| src/dynamic-checkout/config/payment-config.ts | Defines and validates the public override option. |
| package.json | Bumps version to 1.9.17. |
Review effort: Balanced
tomasz-pazdziurek-cko
approved these changes
Oct 22, 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.
Summary
Merchants can now override the display name and logo of payment methods in Dynamic Checkout using a new
paymentMethodsOverridesconfig option. It is keyed by"card"or by the APM gateway name, the same wayadditionalDatais.Changes
paymentMethodsOverrides?: { [key]: { displayName?: string, logoUrl?: string } }getPaymentMethodDisplayOverride(key)toDynamicCheckoutPaymentConfig. Any malformed input (non-object root or entry, inherited keys like__proto__, empty or non-string fields) returns "no override" instead of throwing, because merchants call it from plain JS.Additional Context
id(data-id, radiovalue) andActionHandlerOptions.gateway_namekeep their original values, because they identify the method and select the payment flow.logoUrltakes precedence over both the vector button logo and the raster action-handler logo, so one URL is used for both.