Repository navigation
feat: support payment method display name and logo overrides in dc - #283
Closed
jakubjasinsky wants to merge 1 commit into
Closed
jakubjasinsky wants to merge 1 commit into
jakubjasinsky wants to merge 1 commit into
Conversation
|
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues were identified in static review; tests were inspected but not executed.
No open issues 🎉
What changed in this PR
Adds merchant-configurable payment method names and logos to Dynamic Checkout while preserving defaults and payment-flow identifiers.
Changes:
- Adds
paymentMethodsOverrideswith defensive value validation. - Applies overrides to card, APM, native APM, and saved APM displays.
- Tests configuration exposure, validation, and non-mutation.
| File | Description |
|---|---|
| test/dynamic-checkout/payment-method-overrides.test.ts | Tests override resolution and malformed inputs. |
| 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 labels and logos. |
| src/dynamic-checkout/payment-methods/card.ts | Overrides card labels and logos. |
| src/dynamic-checkout/payment-methods/apm.ts | Overrides APM labels, logos, and continuation text. |
| src/dynamic-checkout/config/payment-config.ts | Defines and validates override configuration. |
Review effort: Balanced
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
Lets merchants override the display name and logo of payment methods in Dynamic Checkout via a new
paymentMethodsOverridesconfig option.Changes
paymentMethodsOverridesoption, keyed by"card"or APMgateway_name(same keying asadditionalData), each entry{ displayName?, logoUrl? }getPaymentMethodDisplayOverride()onDynamicCheckoutPaymentConfigresolves the override for a keyActionHandlerOptions;gateway_namestays untouched since it selects the flowAdditional Context
__proto__) falls back to "no override" instead of throwing and breaking checkout