[ 'supported_gateways' => ['stripe', 'paypal'], ], 'dispute_handler', 'subscriptions']; public function __construct() { parent::__construct( new PayPalSettingsBase(), new PayPalSubscriptions() ); add_filter('fluent_cart/payment_methods_with_custom_checkout_buttons', function ($methods) { $methods[] = 'paypal'; return $methods; }); } public function meta(): array { return [ 'title' => 'PayPal', 'route' => 'paypal', 'slug' => 'paypal', 'label' => 'PayPal', 'description' => __('PayPal is the faster, safer way to send and receive money or make an online payment. Get started or create a merchant account to accept payments.', 'fluent-cart'), 'logo' => Vite::getAssetUrl("images/payment-methods/paypal-icon.svg"), 'icon' => Vite::getAssetUrl("images/payment-methods/paypal-icon.svg"), 'brand_color' => '#60cdff', 'status' => $this->settings->get('is_active') === 'yes', 'upcoming' => false, 'supported_features' => $this->supportedFeatures ]; } public function boot() { (new IPN())->init(); add_action('wp_ajax_nopriv_fluent_cart_confirm_paypal_payment', [$this, 'confirmPayPalSinglePayment']); add_action('wp_ajax_fluent_cart_confirm_paypal_payment', [$this, 'confirmPayPalSinglePayment']); add_action('wp_ajax_nopriv_fluent_cart_confirm_paypal_subscription', [$this, 'confirmPayPalSubscription']); add_action('wp_ajax_fluent_cart_confirm_paypal_subscription', [$this, 'confirmPayPalSubscription']); add_filter('fluent_cart/payment_methods/paypal_client_id', [$this, 'getClientId'], 10, 2); // add PayPal partner tags add_filter('script_loader_tag', function ($tag, $handle) { if ($handle === 'fluent-cart-checkout-sdk-paypal') { $tag = str_replace( '