Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/code/Magento/PaypalGraphQl/etc/graphql/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
<arguments>
<argument name="extendedConfigData" xsi:type="array">
<item name="payment_payflowpro_cc_vault_active" xsi:type="string">payment/payflowpro_cc_vault/active</item>
<item name="paypal_express_active" xsi:type="string">payment/paypal_express/active</item>
<item name="paypal_express_visible_on_cart" xsi:type="string">payment/paypal_express/visible_on_cart</item>
</argument>
</arguments>
</type>
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/PaypalGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ type PayflowProResponseOutput {

type StoreConfig {
payment_payflowpro_cc_vault_active: String @doc(description: "Payflow Pro vault status.")
paypal_express_active: Boolean @doc(description: "Indicates whether the PayPal Express Checkout payment method is enabled.")
paypal_express_visible_on_cart: Boolean @doc(description: "Indicates whether the PayPal Express Checkout button is visible on the shopping cart page.")
}

input VaultTokenInput @doc(description:"Contains required input for payment methods with Vault support.") {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* Copyright 2026 Adobe
* All Rights Reserved.
*/
declare(strict_types=1);

namespace Magento\GraphQl\Paypal;

use Magento\TestFramework\Fixture\Config;
use Magento\TestFramework\TestCase\GraphQlAbstract;

/**
* Test coverage for PayPal Express Checkout availability in the store config
*/
class StoreConfigTest extends GraphQlAbstract
{
private const STORE_CONFIG_QUERY = <<<QUERY
{
storeConfig {
paypal_express_active
paypal_express_visible_on_cart
}
}
QUERY;

#[Config('payment/paypal_express/active', 1)]
#[Config('payment/paypal_express/visible_on_cart', 1)]
public function testStoreConfigPaypalExpressEnabledAndVisible(): void
{
$response = $this->graphQlQuery(self::STORE_CONFIG_QUERY);

self::assertTrue($response['storeConfig']['paypal_express_active']);
self::assertTrue($response['storeConfig']['paypal_express_visible_on_cart']);
}

#[Config('payment/paypal_express/active', 0)]
#[Config('payment/paypal_express/visible_on_cart', 0)]
public function testStoreConfigPaypalExpressDisabledAndHidden(): void
{
$response = $this->graphQlQuery(self::STORE_CONFIG_QUERY);

self::assertFalse($response['storeConfig']['paypal_express_active']);
self::assertFalse($response['storeConfig']['paypal_express_visible_on_cart']);
}
}