Repository navigation
Create admin configuration and display brand icons based on configura… - #552
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Empty icon selections are ignored, preventing administrators from hiding all card-brand icons.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds configurable card-brand icons to the Omise credit-card checkout form.
Changes:
- Adds an admin multiselect for supported icons.
- Exposes selections to checkout and configures OmiseJS.
- Adds unit tests for configuration parsing and icon options.
| File | Description |
|---|---|
view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js |
Applies configured icons to OmiseJS. |
Test/Unit/Model/Source/CardBrandIconTest.php |
Tests available icon options. |
Test/Unit/Model/Config/CcConfigTest.php |
Tests configuration parsing. |
Model/Ui/CcConfigProvider.php |
Exposes icon configuration to checkout. |
Model/Source/CardBrandIcon.php |
Defines selectable card brands. |
Model/Config/Cc.php |
Reads configured icon values. |
etc/adminhtml/system.xml |
Adds the admin multiselect field. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is coherent and covered by focused tests, with only a minor redundant test docblock remaining.
1 open finding
1 resolved since last review
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
| /** | ||
| * @covers \Omise\Payment\Model\Config\Cc::getSupportedCardIcons | ||
| */ | ||
| /** | ||
| * @covers \Omise\Payment\Model\Config\Cc::getSupportedCardIcons | ||
| * @dataProvider emptyConfigValueProvider | ||
| */ |
|





Description
Render selected card brand icons in CC form based on configuration of magento admin panel.


Rollback procedure
default rollback procedure