Skip to content

Add-Ons page: show built-in payment gateways as always-active cards (RFC)#3195

Open
tuguirazvan wants to merge 7 commits into
masterfrom
experiment/built-in-gateway-cards
Open

Add-Ons page: show built-in payment gateways as always-active cards (RFC)#3195
tuguirazvan wants to merge 7 commits into
masterfrom
experiment/built-in-gateway-cards

Conversation

@tuguirazvan

@tuguirazvan tuguirazvan commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Related ticket https://linear.app/strategy11/issue/DES-9/payment-processor-add-ons-in-lite-v-stripe-pro

Lite includes Stripe, Square, and PayPal processing, but the Add-Ons page presents them as Business-locked add-ons, so users think they can't take payments without upgrading.

CleanShot 2026-07-21 at 17 35 02@2x CleanShot 2026-07-21 at 17 35 34@2x

In this update,

  1. Stripe, Square, and PayPal Commerce appear as always-active cards — toggle on and disabled with an explanatory tooltip, no padlock, and a View Docs footer.
  2. The Stripe and PayPal Standard add-ons display as Stripe Pro and PayPal Legacy (names only, until the add-ons API adopts them).
  3. Clicking a disabled add-on toggle no longer triggers a JS error.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added built-in payment gateway add-ons to the Add-Ons page.
    • Added support for Stripe Pro and PayPal Legacy display names.
    • Added icons for additional payment integrations.
    • Built-in add-ons now appear active and include documentation links where available.
  • Bug Fixes

    • Prevented disabled add-on toggles from triggering actions.
    • Improved add-on card controls and status display.

RazvanTugui and others added 4 commits July 20, 2026 16:38
Lite ships Stripe, Square, and PayPal processing in core, but the Add-Ons
page presented "Stripe" and "PayPal Standard" as Business-locked add-ons,
which reads as "you can't take payments without Business".

- Inject Stripe, Square, and PayPal as built_in entries (same pattern as
  the hardcoded Formidable Pro card). They render as active cards: toggle
  on and disabled, no padlock, View Docs footer, and a frm_help tooltip
  explaining the toggle is always on.
- Built-in cards count under the stock "Active" sidebar tab.
- Present the add-ons that extend the built-in gateways as their tiers:
  "Stripe" becomes "Stripe Pro" (excerpt leads with removing the 3%
  transaction fee), "PayPal Standard" becomes "PayPal Legacy". These are
  display-level overrides until the add-ons API reflects the naming.

Experiment/RFC quality: @SInCE placeholders, untranslated strings, and
Business/Elite states are untested on a licensed install.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Clicking a disabled toggle (built-in gateways, Formidable Pro) ran the
activate/deactivate action lookup and crashed on the missing action
button. Matches the guard on the add_mock_addons branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Aligns with the naming used on the add_mock_addons branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The overridden Stripe Pro excerpt claimed installing the add-on removes
the 3% transaction fee, but fee removal is gated by the license. Keep
the add-ons' original excerpts and only override the display names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 13e449bc-b624-4df1-a5c4-6c3387d11f9a

📥 Commits

Reviewing files that changed from the base of the PR and between c00002d and 1b5fa9c.

📒 Files selected for processing (4)
  • classes/controllers/FrmAddonsController.php
  • classes/helpers/FrmAddonsHelper.php
  • classes/views/addons/addon.php
  • tests/cypress/e2e/Add-Ons/validateAddOnsPage.cy.js
🚧 Files skipped from review as they are similar to previous changes (3)
  • classes/helpers/FrmAddonsHelper.php
  • classes/views/addons/addon.php
  • classes/controllers/FrmAddonsController.php

📝 Walkthrough

Walkthrough

The Add-Ons page now includes predefined built-in payment gateways. Built-in entries receive active status, bypass locking, use expanded icon mappings, render dedicated controls and documentation links, and ignore disabled toggle interactions.

Changes

Built-in add-on support

Layer / File(s) Summary
Built-in add-on catalog and status
classes/controllers/FrmAddonsController.php, tests/cypress/e2e/Add-Ons/validateAddOnsPage.cy.js
The controller merges predefined built-in gateways, applies display-name overrides, marks built-in add-ons as active, and updates PayPal Legacy assertions.
Built-in add-on helper state
classes/helpers/FrmAddonsHelper.php
The helper tracks built-in state, bypasses locking, exposes the state, and adds gateway icon mappings.
Built-in rendering and toggle behavior
classes/views/addons/addon.php, js/src/addons-page/events/addonToggleListener.js, js/addons-page.js
Built-in cards render dedicated toggle and documentation behavior, while disabled toggle inputs no longer trigger actions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: crabcyborg

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: built-in payment gateways are shown as always-active cards on the Add-Ons page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch experiment/built-in-gateway-cards

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Jul 21, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 057c563...1b5fa9c on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Jul 21, 2026 2:45p.m. Review ↗
JavaScript Jul 21, 2026 2:45p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Release tooling replaces x.x with the version number.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tuguirazvan tuguirazvan changed the title Experiment/built in gateway cards Add-Ons page: show built-in payment gateways as always-active cards (RFC) Jul 21, 2026
@tuguirazvan
tuguirazvan marked this pull request as draft July 21, 2026 14:16
RazvanTugui and others added 2 commits July 21, 2026 17:44
Fixes the two PHPCS Squiz.Commenting.LongConditionClosingComment errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Searching by the original name still finds the card; only the
displayed name assertions change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tuguirazvan
tuguirazvan marked this pull request as ready for review July 21, 2026 15:15
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.

2 participants