Skip to content

Create admin configuration and display brand icons based on configura… - #552

Merged
pratik-bharodiya merged 7 commits into
developfrom
cc-form-brand-icons
Oct 8, 2026
Merged

pratik-bharodiya merged 7 commits into
developfrom
cc-form-brand-icons

Conversation

@pratik-bharodiya

@pratik-bharodiya pratik-bharodiya commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

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

Rollback procedure

default rollback procedure

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Empty icon selections are ignored, preventing administrators from hiding all card-brand icons.

Review effort: Balanced
Findings: 1 Medium severity

Open (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.

Comment thread view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js Outdated
Comment thread etc/adminhtml/system.xml Outdated
Comment thread Model/Config/Cc.php Outdated
Comment thread Model/Config/Cc.php Outdated
Comment thread view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js Outdated
@rosle
rosle requested a balanced review from Copilot October 8, 2026 02:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

Comment thread Test/Unit/Model/Config/CcConfigTest.php Outdated
Comment on lines +20 to +26
/**
* @covers \Omise\Payment\Model\Config\Cc::getSupportedCardIcons
*/
/**
* @covers \Omise\Payment\Model\Config\Cc::getSupportedCardIcons
* @dataProvider emptyConfigValueProvider
*/
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@pratik-bharodiya
pratik-bharodiya merged commit e786646 into develop Oct 8, 2026
5 of 6 checks passed
@pratik-bharodiya
pratik-bharodiya deleted the cc-form-brand-icons branch October 8, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants