WooCommerce 插件
Ask AI
1. 概述
GLODIPAY WooCommerce 插件将 GLODIPAY 支付网关集成到 WooCommerce,使商户能够通过统一平台接受信用卡/借记卡付款。
支持的支付方式:
- Visa / Mastercard / JCB / Amex / Diners / Maestro / Discover
结账兼容性:
- WooCommerce 经典结账 (Classic Checkout)
- WooCommerce 区块结账 (Block Checkout / Gutenberg)
2. 系统要求
| 要求 | 最低版 本 |
|---|---|
| WordPress | 5.8+ |
| WooCommerce | 7.0+ |
| PHP | 7.4+ |
| OpenSSL | 必需 |
OpenSSL 是插件用于签署支付请求和验证 Webhook 真实性的安全库。大多数托管服务商(cPanel、WP Engine、Cloudways、SiteGround 等)已默认预装,无需额外操作。验证方法:WordPress Admin → Tools → Site Health → Info → Server,查找 OpenSSL 条目。
接收 Webhook 的服务器要求:
- 商户网站必须可从互联网公开访问
- 必须使用 HTTPS
- Webhook 端点
/?wc-api=glodipay_webhook不得有 IP/地区封锁
3. 安装
前置条件
在安装或更新任何插件之前,请务必备份您的网站。
步骤 1:下载插件
联系 GLODIPAY 获取插件 ZIP 文件。
步骤 2:登录 WordPress 后台
访问 https://yoursite.com/wp-admin
步骤 3:进入添加插件页面
Plugins → Add New Plugin

步骤 4:上传插件
点击添加插件页面顶部的 "Upload Plugin"。

步骤 5:选择 ZIP 文件
选择从 GLODIPAY 获取的 ZIP 文件。

步骤 6:安装
选择 ZIP 文件后,点击 "Install Now" 继续。
WordPress 将从上传的 ZIP 文件安装插件。
步骤 7:激活
安装完成后,点击 "Activate Plugin"。

或从 Plugins → Installed Plugins → GLODIPAY Payment Gateway → Activate 激活。

步骤 8:验证
访问您的结账页面,确认 GLODIPAY 支付选项已出现。
4. 配置
步骤 1:访问 GLODIPAY Merchant
- 登录 GLODIPAY Merchant 的商户账户
- 确保已完成邮箱验证和 KYB 认证
- 在左侧菜单中进入 API Keys

步骤 2:获取 API Keys
在 API Keys 页面复制以下内容:
| 密钥 | 说明 |
|---|---|
| Merchant ID | 唯一商户标识符 |
| Base Endpoint | API 基础 URL(沙盒或生产环境) |
| RSA Public Key | 用于验证 Webhook 签名 |
| RSA Private Key | 用于签署支付请求 |
| Expiration Date | 密钥到期日期 |
步骤 3:在 WordPress 中配置插件
通过以下任一方式访问:
- 方式 1: Plugins → GLODIPAY Payment Gateway → Settings

- 方式 2: WooCommerce → Settings → Payments → GLODIPAY Payment Gateway → Manage

4.1 基本设置
| 设置 | 说明 | 默认值 |
|---|---|---|
| Enable/Disable | 激活支付网关 | Enabled |
| Sandbox Mode | 在沙盒(测试)和生产(正式)环境间切换 | Disabled |
| Thank You Page URL | 支付后的自定义跳转 URL。留空使用 WooCommerce 默认页面 | (空) |

重要: 在切换到生产环境之前,请务必在沙盒模式下进行测试。
4.2 API Keys
沙盒设置
| 字段 | 说明 |
|---|---|
| Sandbox Merchant ID | 测试环境的商户 ID |
| Sandbox RSA Public Key | 沙盒环境的公钥 |
| Sandbox RSA Private Key | 沙盒环境的私钥 |
| Sandbox Base URL | 默认:https://checkout-sandbox.glodipayprocessing.com |
生产设置
| 字段 | 说明 |
|---|---|
| Production Merchant ID | 正式环境的商户 ID |
| Production RSA Public Key | 生产环境的公钥 |
| Production RSA Private Key | 生产环境的私钥 |
| Production Base URL | 由 GLODIPAY 提供 |

4.3 支付 Iframe 操作按钮
自定义支付浮层上显示的操作按钮。
刷新按钮
| 字段 | 说明 | 默认值 |
|---|---|---|
| Show Refresh Button | 在 iframe 上显示刷新按钮 | Yes |
| Refresh Button Text | 按钮标签文本 | Refresh |
| Refresh Button Color | 按钮背景颜色(十六进制) | #0073aa |
取消按钮
| 字段 | 说明 | 默认值 |
|---|---|---|
| Show Cancel Button | 在 iframe 上显示取消按钮 | Yes |
| Cancel Button Text | 按钮标签文本 | Cancel |
| Cancel Button Color | 按钮背景颜色(十六进制) | #dc3232 |
4.4 调试设置
| 设置 | 说明 | 默认值 |
|---|---|---|
| Enable Debug Mode | 将详细支付信息记录到 WooCommerce Logger | No |
| Block Checkout Debug | 为 Block Checkout 问题记录额外日志 | No |