WordPress Plugin Installation Guide

🧧

Red Envelope Payment Gateway

Installation & Configuration Guide — Version 2.16.0

What this plugin does: Accept USDC stablecoin payments on your WooCommerce store via the Red Envelope Wallet on AQY Chain. Your customers pay with crypto and earn AQY token rewards on every purchase.

📋 Requirements

WordPress 5.8 or higher
WooCommerce 5.0 or higher
PHP 7.4 or higher
SSL Certificate Required (HTTPS)
M2C Merchant Account Active wallet on the M2C platform

⬇️ Step 1 — Download the Plugin

Download the latest version of the plugin ZIP file:

⬇️ Download ab2bc-red-envelope.zip

📦 Step 2 — Install the Plugin

  1. Log in to your WordPress Admin Dashboard.
  2. Go to Plugins → Add New → Upload Plugin.
  3. Click “Choose File” and select the ab2bc-red-envelope.zip file you downloaded.
  4. Click “Install Now” and wait for the upload to complete.
  5. Click “Activate Plugin”.
💡 Tip: If you are upgrading from a previous version, deactivate the old plugin first, delete it, then install the new version.

⚙️ Step 3 — Configure the Payment Gateway

  1. Go to WooCommerce → Settings → Payments.
  2. Find “Red Envelope Payment” in the list and click “Manage” (or toggle it on first).
  3. Configure the following settings:
Setting Description
Enable/Disable Toggle to enable Red Envelope payments.
Title The payment method name shown to customers at checkout (default: “Red Envelope Payment”).
Description Text displayed below the payment method on checkout.
Merchant Wallet Address Your AQY Chain wallet address where USDC payments are settled. Must be a verified M2C member wallet.
AQY Reward % Percentage of the order total awarded as AQY tokens to the buyer (default: 60%).
Merchant Commission % Commission percentage for the merchant (default: 50%).
AQY Base Price Base price for AQY token calculation (default: $0.10).
API Endpoint M2C Backend API URL (default: https://m2c.ab2bc.com/api).
RPC Endpoint AQY Chain RPC URL (default: https://rpc.aqy.ab2bc.com).

🔐 Step 4 — Verify Your Merchant Wallet

After entering your wallet address, click the “Verify M2C Wallet” button in the gateway settings. The plugin will:

  • Check that your wallet is a registered M2C member.
  • Verify your merchant status on AQY Chain.
  • Cache the verification for 12 hours (re-checked automatically twice daily).
✅ Important: The payment gateway will only be available to customers if your merchant wallet is verified. If verification fails, the gateway is automatically disabled and you will receive an email alert.

🎁 Step 5 — Configure Product Bonuses (Optional)

You can set custom AQY reward percentages per product:

  1. Edit any WooCommerce product.
  2. Scroll to the “Red Envelope Bonus” panel in the Product Data section.
  3. Set a custom AQY reward percentage for that specific product.
  4. Leave blank to use the global default.

🛒 How Checkout Works

  1. Customer selects “Red Envelope Payment” at checkout.
  2. A QR code is displayed with the USDC payment amount and your merchant wallet address.
  3. Customer scans the QR code with their Red Envelope Wallet (PWA).
  4. Payment is sent in USDC on AQY Chain — settled directly to your wallet.
  5. The plugin automatically verifies the on-chain transaction and marks the order as paid.
  6. Customer receives AQY token rewards in their wallet.

🔌 WooCommerce Blocks Support

The plugin fully supports the new WooCommerce Blocks checkout in addition to the classic checkout. No additional configuration is needed — it works out of the box with both checkout experiences.

🔑 M2C SSO Integration

The plugin includes optional Single Sign-On (SSO) integration with the M2C platform:

  • Customers can log in to your store using their M2C account.
  • Wallet addresses are automatically linked for seamless payments.
  • Configure SSO settings under WooCommerce → Settings → Payments → Red Envelope Payment.

📊 Transaction Monitoring

View all Red Envelope transactions from your WordPress admin:

  • Go to WooCommerce → AB2BC Transactions.
  • See payment status, amounts, wallet addresses, and on-chain TX hashes.
  • Use the “Test Connection” button to verify API connectivity.

❓ Troubleshooting

Issue Solution
Gateway not showing at checkout Ensure the gateway is enabled and your merchant wallet is verified. Check WooCommerce → Status for errors.
QR code not generating Verify your API Endpoint and RPC Endpoint are correct. Use “Test Connection” in AB2BC Transactions.
Payment not confirming Check the AQY Chain RPC endpoint is reachable. Ensure the customer sent the exact USDC amount.
Merchant verification failed Ensure your wallet is registered as an M2C member at m2c.ab2bc.com. Retry verification after 15 minutes.
Plugin conflicts This plugin automatically resolves known conflicts with Payoneer Checkout and Codisto Connect. If other conflicts arise, check the WooCommerce error log.

📞 Support

Need help?