Skip to content

Expose PayPal Express availability in GraphQL storeConfig (#39165) - #41217

Open
lbajsarowicz wants to merge 11 commits into
magento:2.4-developfrom
lbajsarowicz:feature/39165-paypal-express-store-config
Open

Expose PayPal Express availability in GraphQL storeConfig (#39165)#41217
lbajsarowicz wants to merge 11 commits into
magento:2.4-developfrom
lbajsarowicz:feature/39165-paypal-express-store-config

Conversation

@lbajsarowicz

Copy link
Copy Markdown
Contributor

Description (*)

Continues #39163 by @dimitriBouteille, which has been conflicting with 2.4-develop since 2025. This PR carries the original commits and authorship, merged with the current base.

StoreConfig exposes payment_payflowpro_cc_vault_active for the PayPal family but nothing for PayPal Express, so a headless storefront cannot tell whether the method is enabled or whether the Express button should be shown on the cart page. Both values are plain config paths, payment/paypal_express/active and payment/paypal_express/visible_on_cart, and are exposed here through the existing extendedConfigData mechanism of StoreConfigDataProvider, as Boolean fields.

Changes on top of the original PR:

  • merged with 2.4-develop, conflict in di.xml resolved
  • field descriptions rewritten as plain text in the style of the other Boolean StoreConfig fields (the original had a typo in one of them)
  • API-functional test Magento\GraphQl\Paypal\StoreConfigTest asserting both fields follow the configured values

The fields return the raw configuration, the same way payment_payflowpro_cc_vault_active and the PaymentGraphQl fields do. Whether the Express button actually renders on the storefront also depends on Magento\Paypal\Helper\Shortcut\Validator (method availability), which is not replicated here.

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes [Issue] [Feature request] Add paypal_express_visible_on_cart & paypal_express_active in graphql StoreConfig #39165

Manual testing scenarios (*)

  1. Enable PayPal Express Checkout and set Stores > Configuration > Sales > Payment Methods > PayPal Express Checkout > Advanced Settings > Display on Shopping Cart to Yes.
  2. Send { storeConfig { paypal_express_active paypal_express_visible_on_cart } } to /graphql: both return true.
  3. Set Display on Shopping Cart to No: paypal_express_visible_on_cart returns false.

Questions or comments

Gates run locally: PHPCS, PHPStan and the Static Tests LiveCodeTest on the changed files are clean. The API-functional test needs the WebAPI build.

The Semantic Version Checker will report the two added StoreConfig fields as an additive schema change.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@lbajsarowicz

Copy link
Copy Markdown
Contributor Author

@magento run all tests

@m2-assistant

m2-assistant Bot commented Sep 4, 2026

Copy link
Copy Markdown

Hi @lbajsarowicz. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue] [Feature request] Add paypal_express_visible_on_cart & paypal_express_active in graphql StoreConfig

3 participants