# Payment Gateway FAQ ## Q: What goes in the "Payment Providers" card? **A:** The "Payment Providers" card is designed for **major payment processor integrations** like: - Stripe - PayPal (official WooCommerce PayPal) - Square - Authorize.net - Braintree - Amazon Pay These are gateways that: 1. Have `type = 'provider'` in our categorization 2. Are recognized by their gateway ID in `PaymentGatewaysProvider::categorize_gateway()` 3. Will eventually have custom UI components (Phase 2) **Current behavior:** - If none of these are installed, the card shows: "No payment providers installed" - Local payment gateways (TriPay, Duitku, etc.) go to "3rd Party Payment Methods" **To add a gateway to "Payment Providers":** Edit `includes/Compat/PaymentGatewaysProvider.php` line 115: ```php $providers = ['stripe', 'paypal', 'stripe_cc', 'ppec_paypal', 'square', 'authorize_net']; ``` --- ## Q: Does WooNooW listen to WooCommerce's form builder? **A: YES! 100% automatic.** ### How it works: **Backend (PaymentGatewaysProvider.php):** ```php // Line 190 $form_fields = $gateway->get_form_fields(); ``` This reads ALL fields defined in the gateway's `init_form_fields()` method, including: - `enable_icon` (checkbox) - `custom_icon` (text) - `description` (textarea) - `expired` (select with options) - `checkout_method` (select) - ANY other field the addon defines **Categorization:** - `basic`: enabled, title, description, instructions - `api`: Fields with keywords: key, secret, token, api, client, merchant, account - `advanced`: Everything else **Frontend (GenericGatewayForm.tsx):** Automatically renders: - ✅ text, password, number, email, url → `` - ✅ checkbox → `` - ✅ select → `