mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Create a service to list all the gateway IDs
This commit is contained in:
parent
4e0e58c7b5
commit
fbd78d0527
1 changed files with 41 additions and 0 deletions
|
@ -10,7 +10,18 @@ declare( strict_types = 1 );
|
|||
namespace WooCommerce\PayPalCommerce\Settings;
|
||||
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
|
||||
use WooCommerce\PayPalCommerce\Applepay\ApplePayGateway;
|
||||
use WooCommerce\PayPalCommerce\Axo\Gateway\AxoGateway;
|
||||
use WooCommerce\PayPalCommerce\Button\Helper\MessagesApply;
|
||||
use WooCommerce\PayPalCommerce\Googlepay\GooglePayGateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\BancontactGateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\BlikGateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\EPSGateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\IDealGateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\MultibancoGateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\MyBankGateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\P24Gateway;
|
||||
use WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods\TrustlyGateway;
|
||||
use WooCommerce\PayPalCommerce\Settings\Ajax\SwitchSettingsUiEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Data\Definition\FeaturesDefinition;
|
||||
use WooCommerce\PayPalCommerce\Settings\Data\Definition\PaymentMethodsDependenciesDefinition;
|
||||
|
@ -46,6 +57,11 @@ use WooCommerce\PayPalCommerce\Settings\Service\DataSanitizer;
|
|||
use WooCommerce\PayPalCommerce\Settings\Service\SettingsDataManager;
|
||||
use WooCommerce\PayPalCommerce\Settings\Data\Definition\PaymentMethodsDefinition;
|
||||
use WooCommerce\PayPalCommerce\PayLaterConfigurator\Factory\ConfigFactory;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CardButtonGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\OXXO\OXXO;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayUponInvoice\PayUponInvoiceGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
||||
use WooCommerce\PayPalCommerce\PayLaterConfigurator\Endpoint\SaveConfig;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Helper\Environment;
|
||||
|
@ -570,4 +586,29 @@ return array(
|
|||
'settings.service.gateway-redirect' => static function (): GatewayRedirectService {
|
||||
return new GatewayRedirectService();
|
||||
},
|
||||
/**
|
||||
* Returns a list of all payment gateway IDs created by this plugin.
|
||||
*
|
||||
* @returns string[] The list of all gateway IDs.
|
||||
*/
|
||||
'settings.config.all-gateway-ids' => static function (): array {
|
||||
return array(
|
||||
PayPalGateway::ID,
|
||||
CardButtonGateway::ID,
|
||||
CreditCardGateway::ID,
|
||||
AxoGateway::ID,
|
||||
ApplePayGateway::ID,
|
||||
GooglePayGateway::ID,
|
||||
BancontactGateway::ID,
|
||||
BlikGateway::ID,
|
||||
EPSGateway::ID,
|
||||
IDealGateway::ID,
|
||||
MyBankGateway::ID,
|
||||
P24Gateway::ID,
|
||||
TrustlyGateway::ID,
|
||||
MultibancoGateway::ID,
|
||||
PayUponInvoiceGateway::ID,
|
||||
OXXO::ID,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue