=== Payment Gateway for PhoeniXGate on WooCommerce ===
Contributors: wpspin
Donate link:
Tags: woocommerce, payment-gateway, credit-card, woocommerce-payment-gateway, echeck
Requires at least: 4.0.0
Tested up to: 6.9.1
Stable tag: 2.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Phoenix's unified e-commerce and multi-channel gateway solution for the payments industry.

== Description ==

💳 **Payment Gateway for PhoeniXGate on WooCommerce** brings the power of Phoenix's omni-channel payment platform directly to your WooCommerce store. Accept credit card and e-check (ACH) payments seamlessly — all through a single, secure connection.

PhoeniXGate is a fully managed payment infrastructure built for the modern payments industry. Whether you run a small online shop or a large multi-site network, this plugin gives you everything you need to process payments confidently.

= ⚡ Key Features =

* 💳 **Credit Card Payments** — Accept Visa, Mastercard, and other major cards at checkout.
* 🏦 **E-Check / ACH Payments** — Let customers pay directly from their bank account using routing and account numbers.
* 🔄 **Easy Refunds** — Process full or partial refunds for credit card transactions right from the WooCommerce order screen.
* 🧪 **Test Mode** — Safely test your entire payment flow using sandbox credentials before going live. Use test card `4111111111111111` to simulate transactions.
* 🐛 **Debug Logging** — Enable detailed API error logs under WooCommerce > Status > Logs for easy troubleshooting.
* 🌐 **WordPress Multisite Support** — Works on single-site and multisite (network) installations. Each site can have its own gateway configuration.
* 🔒 **Secure by Design** — Card data is transmitted directly to PhoeniXGate's API and is never stored on your server.
* ✅ **Real-Time Validation** — Built-in client-side validation catches card number, expiry, and CVV errors before the form is submitted.
* 🛠️ **Independent Gateway Controls** — Enable or disable credit card and e-check gateways separately, each with their own API credentials.
* 🌍 **Translation Ready** — Fully internationalized with a .pot file included for easy localization.

= 🎯 Use Cases =

1. 🛒 **Online Retail Store** — Sell physical products (clothing, electronics, home goods) and accept credit card payments at checkout.
2. 🎓 **Online Course Platform** — Collect tuition or course fees from students via credit card or e-check.
3. 🍕 **Food & Beverage Orders** — Accept online payments for restaurant takeout, catering, or meal-kit deliveries.
4. 💼 **Professional Services** — Freelancers, consultants, and agencies can invoice clients and collect payments through their WooCommerce store.
5. 🏢 **B2B Wholesale** — Business buyers often prefer paying via e-check (ACH). Offer both card and bank transfer options on one checkout page.
6. 🎟️ **Event Tickets & Registrations** — Sell tickets for conferences, workshops, or community events and process payments instantly.
7. 💝 **Nonprofit & Donation Sites** — Accept one-time donations via credit card or e-check through a WooCommerce-powered donation page.
8. 🏠 **Rent & Fee Collection** — Property managers or HOAs can collect monthly payments via e-check for lower processing fees.
9. 🌐 **WordPress Multisite Networks** — Agencies or franchises running multiple stores on a single WordPress multisite can configure PhoeniXGate independently per site.
10. 📦 **Subscription Boxes & Memberships** — Use with WooCommerce membership or subscription plugins to collect initial payments via PhoeniXGate at sign-up.
11. 🔧 **Service Booking & Appointments** — Pair with a booking plugin to collect payment when customers schedule appointments (salons, clinics, repair services).
12. 🖥️ **Digital Products & Downloads** — Sell software, eBooks, templates, or digital art and collect payment instantly at checkout.

= ⚙️ Settings & Configuration Guide =

Setting up PhoeniXGate is quick and straightforward. Follow these steps:

**Step 1 — Install & Activate**

1. Upload the plugin folder to `/wp-content/plugins/` or install it from the WordPress plugin directory.
2. Go to **Plugins → Installed Plugins** and click **Activate** on "Payment Gateway for PhoeniXGate on WooCommerce".
3. Make sure **WooCommerce** is already installed and active.

**Step 2 — Configure Credit Card Gateway**

1. Go to **WooCommerce → Settings → Payments**.
2. Find **"PhoeniXGate Credit Cards"** in the list and click **Manage** (or toggle it on and click **Set up**).
3. Fill in the settings:

   * ✅ **Enable/Disable** — Check this box to enable the credit card gateway.
   * 📝 **Title** — The name customers see at checkout (e.g., "Credit Card").
   * 📝 **Description** — A short message shown below the title (e.g., "Pay securely with your credit card.").
   * 🧪 **Test Mode** — Check this to use sandbox credentials. Uncheck when you are ready to go live.
   * 🐛 **Debug Log** — Check this to log API errors. View logs at **WooCommerce → Status → Logs**.
   * 🔗 **Test API URL** — Your PhoeniXGate sandbox API endpoint (provided by Phoenix Managed Networks).
   * 👤 **Test Username** — Your sandbox API username.
   * 🔑 **Test Password** — Your sandbox API password.
   * 🔗 **Live API URL** — Your production API endpoint.
   * 👤 **Live Username** — Your production API username.
   * 🔑 **Live Password** — Your production API password.

4. Click **Save changes**.

**Step 3 — Configure E-Check / ACH Gateway (Optional)**

1. On the same **WooCommerce → Settings → Payments** page, find **"PhoeniXGate Check Payment"** and click **Manage**.
2. Fill in the same fields as above (the e-check gateway uses its own separate credentials).
3. Click **Save changes**.

**Step 4 — Test Your Setup**

1. Make sure **Test Mode** is enabled on whichever gateway you want to test.
2. Go to your store's checkout page and place a test order.
   * For credit cards, use card number `4111111111111111` with any future expiry date and any 3-digit CVV.
   * For e-checks, use routing number `123456789` with any account number.
3. Confirm the order is marked as **Completed** in **WooCommerce → Orders**.
4. Check **WooCommerce → Status → Logs** for any error messages if the transaction fails.

**Step 5 — Go Live**

1. Go back to the gateway settings and **uncheck Test Mode**.
2. Enter your **Live API URL**, **Live Username**, and **Live Password** (provided by Phoenix Managed Networks).
3. Click **Save changes**. Your store is now processing real payments!

**💡 Tip:** You can enable both credit card and e-check gateways at the same time. Customers will see both options at checkout and can choose their preferred payment method.

= 🤝 Works Great With These Popular Plugins =

PhoeniXGate integrates with WooCommerce, so it naturally works alongside the entire WooCommerce ecosystem. Here are some popular plugins it pairs well with:

* 🛒 **WooCommerce** (required) — The foundation. PhoeniXGate registers as a native WooCommerce payment gateway.
* 📦 **WooCommerce Subscriptions** — Collect the initial subscription payment through PhoeniXGate when customers sign up.
* 👥 **WooCommerce Memberships** — Gate content behind membership plans and collect payment at registration.
* 📊 **WooCommerce PDF Invoices & Packing Slips** — Automatically generate invoices for orders paid through PhoeniXGate.
* 📧 **WooCommerce Email Customizer** — Customize the order confirmation and payment receipt emails sent after a PhoeniXGate transaction.
* 🧾 **WooCommerce Cart & Checkout Add-ons** — Add custom fees, gift wrapping, or special instructions at checkout alongside PhoeniXGate.
* 📅 **WooCommerce Bookings** — Accept payments for appointment-based or date-based services through PhoeniXGate at checkout.
* 🚚 **WooCommerce Shipping plugins (Table Rate, Flat Rate, etc.)** — Calculate shipping costs and collect total payment (including shipping) via PhoeniXGate.
* 🔍 **WooCommerce Google Analytics Integration** — Track completed purchases and e-commerce events for transactions processed through PhoeniXGate.
* 💰 **WooCommerce Dynamic Pricing & Discounts** — Apply dynamic pricing rules or bulk discounts, and the adjusted total is processed by PhoeniXGate.
* 🌐 **WPML / Polylang** — Translate your checkout page (including the PhoeniXGate payment form title and description) into multiple languages.
* 🔐 **Wordfence / Sucuri Security** — Keep your store secure while processing payments. PhoeniXGate transmits card data directly to the API, so no sensitive data is stored locally.
* ⚡ **WP Super Cache / W3 Total Cache** — Speed up your store pages. The checkout and payment processing are dynamic and work correctly with page caching plugins.
* 📱 **Starter Templates / Starter Sites (e.g., Starter Templates by Starter Templates)** — Build your store quickly with pre-designed WooCommerce templates and add PhoeniXGate as the payment method.

= 🔒 Security Notes =

* Card numbers, CVVs, and bank account details are sent directly to the PhoeniXGate API over HTTPS. They are **never stored** in your WordPress database.
* Always use **HTTPS/SSL** on your site when accepting payments.
* The plugin sanitizes all user input on the server side using WordPress sanitization functions.
* Enable **Debug Mode** only when troubleshooting — disable it in production to avoid logging sensitive request details.

== Installation ==

= 📥 Automatic Installation (Recommended) =

1. Go to **Plugins → Add New** in your WordPress admin.
2. Search for **"Payment Gateway for PhoeniXGate"**.
3. Click **Install Now**, then **Activate**.
4. Go to **WooCommerce → Settings → Payments** to configure your gateway.

= 📂 Manual Installation =

1. Download the plugin ZIP file.
2. Upload the plugin folder to the `/wp-content/plugins/` directory (or use **Plugins → Add New → Upload Plugin**).
3. Activate the plugin through the **Plugins** menu in WordPress.
4. Go to **WooCommerce → Settings → Payments** to configure PhoeniXGate.

= 🌐 Multisite Installation =

1. Upload the plugin to `/wp-content/plugins/`.
2. Network Activate the plugin from the **Network Admin → Plugins** screen, or activate it on individual sites.
3. Make sure WooCommerce is active either network-wide or on the site where you want to use PhoeniXGate.
4. Configure gateway settings on each site independently via **WooCommerce → Settings → Payments**.

= ✅ Requirements =

* WordPress 4.0.0 or higher
* WooCommerce plugin installed and active
* PHP 7.0 or higher (recommended)
* SSL certificate (HTTPS) for live payment processing

== Frequently Asked Questions ==

= 💳 What payment methods does this plugin support? =
The plugin supports two payment methods: **Credit Card** payments and **E-Check (ACH)** payments. Both can be enabled independently.

= 🧪 How do I test the plugin before going live? =
Enable **Test Mode** in the gateway settings and use the sandbox API credentials provided by Phoenix Managed Networks. Use test card number `4111111111111111` for credit cards or routing number `123456789` for e-checks.

= 🔑 Where do I get my API credentials? =
Your API URL, username, and password are provided by **Phoenix Managed Networks**. Contact them to set up your merchant account.

= 🌐 Does this plugin work with WordPress Multisite? =
Yes! As of version 2.2.0, the plugin fully supports WordPress Multisite (Network) installations. Each site in the network can have its own independent gateway configuration.

= 🔄 Can I process refunds? =
Yes, you can process refunds for credit card transactions directly from the WooCommerce order screen. E-check refunds are not currently supported through the plugin.

= 🔒 Is it safe to use? Where is card data stored? =
Card data is **never stored** on your WordPress site. All payment information is transmitted directly to the PhoeniXGate API over a secure connection. Always ensure your site uses HTTPS/SSL.

= 🐛 A transaction failed. How do I debug it? =
Enable **Debug Log** in the gateway settings. Then check **WooCommerce → Status → Logs** for detailed error messages from the PhoeniXGate API.

= 💰 Can I use both credit cards and e-checks at the same time? =
Absolutely! Each gateway is independent. Enable both in **WooCommerce → Settings → Payments** and customers will see both options at checkout.

== Screenshots ==

1. ⚙️ Enable PhoeniXGate payment gateway in WooCommerce Payments settings
2. 🔧 PhoeniXGate Credit Card gateway settings page
3. 💳 Checkout page showing the PhoeniXGate credit card form
4. 🏦 E-check (ACH) payment gateway form at checkout

== Changelog ==

= 2.3.0 =
* 🛠️ Added support contact banner on gateway settings pages
* ✅ Tested with WordPress 6.9.1

= 2.2.0 =
* 🌐 Added WordPress Multisite (Network) support

= 2.1.0 =
* 🔧 Fixed transaction API response key name
* ✅ Tested with WordPress 6.6

= 2.0.0 =
* 🏦 Added e-check (ACH) payment gateway option

= 1.1.0 =
* ✅ Tested with WordPress 6.2

= 1.0.1 =
* ✅ Tested with WordPress 6.1

= 1.0.0 =
* 🚀 Initial release of the plugin
