Title: Melon Payment Gateway for WooCommerce
Author: getmelon
Published: <strong>2025 年 12 月 27 日</strong>
Last modified: 2025 年 12 月 29 日

---

搜索插件

![](https://ps.w.org/melon-payment-gateway/assets/icon-256x256.png?rev=3428418)

# Melon Payment Gateway for WooCommerce

 作者：[getmelon](https://profiles.wordpress.org/getmelon/)

[下载](https://downloads.wordpress.org/plugin/melon-payment-gateway.zip)

 * [详情](https://cn.wordpress.org/plugins/melon-payment-gateway/#description)
 * [评价](https://cn.wordpress.org/plugins/melon-payment-gateway/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/melon-payment-gateway/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/melon-payment-gateway/#developers)

 [支持](https://wordpress.org/support/plugin/melon-payment-gateway/)

## 描述

Melon Payment Gateway is a complete payment integration plugin that allows your 
store to accept payments through:

 * **Melon Wallet** – Direct wallet-to-wallet payments with OTP verification
 * **Payment Gateway** – Card and mobile money payments via Paga

#### Key Features

 * Complete payment flow with phone number validation
 * OTP verification for secure transactions
 * Melon wallet balance checking
 * Support for both traditional and block-based checkout
 * Real-time payment status updates
 * Webhook support for payment confirmations
 * Mobile-responsive payment modals
 * Secure API integration with proper validation
 * Payment reference tracking

#### Payment Flow

 1. Customer enters phone number (Melon ID)
 2. System validates Melon ID via API
 3. OTP verification (if required)
 4. Payment method selection (Melon Wallet or Gateway)
 5. Payment processing and confirmation
 6. Order completion

#### Requirements

 * WooCommerce 5.0 or higher
 * WordPress 5.8 or higher
 * PHP 7.4 or higher
 * Valid Melon API credentials

#### Getting Started

 1. Install and activate the plugin
 2. Go to Settings > Melon
 3. Enter your Melon API credentials:
 4.  * Base URL
     * Public Key
     * Source
     * Note: Origin is automatically detected from your WordPress site URL
 5. Enable the Melon payment gateway in Settings > Payments
 6. Start accepting payments!

#### Support

For support, documentation, and updates, visit [getmelon.co](https://getmelon.co)

### Additional Information

#### API Integration

The plugin integrates with the Melon API to provide secure payment processing. All
API communications are encrypted and validated. The plugin supports both staging
and production environments.

#### Webhook Configuration

The plugin automatically registers a webhook endpoint at `/wp-json/melon/v1/paga-
webhook` for payment confirmations. No additional configuration is required for 
webhook functionality.

#### Custom Metadata

The plugin supports sending custom order metadata to the Melon API. Enable this 
feature in Settings > Melon to send additional order information including customer
details, billing and shipping addresses.

#### HPOS Compatibility

This plugin is fully compatible with WooCommerce High-Performance Order Storage (
HPOS) and WooCommerce Blocks checkout, ensuring compatibility with the latest features.

#### Security

All user inputs are sanitized and validated. API credentials are stored securely
in the WordPress database. The plugin follows WordPress coding standards and security
best practices.

### External Services

This plugin communicates with external services operated by Melon to provide payment
processing functionality.

#### Melon Payment Infrastructure

The plugin integrates with the Melon payment infrastructure API (https://api.getmelon.
co) to process payments, verify phone numbers, and handle transaction confirmations.

**Why this service is required:**

The Melon payment infrastructure is essential for processing payments through the
Melon Wallet and Payment Gateway (Paga). Without this service, the plugin cannot
function.

**What data is sent:**

 * Phone number (Melon ID) – Required for wallet verification and payment processing
 * Order reference – Unique identifier for tracking transactions
 * Payment amount – Transaction amount in the store’s currency
 * Payment metadata (optional) – Additional order information if custom metadata
   is enabled, including:
    - Order ID
    - Customer name, email, and phone
    - Billing and shipping addresses
    - Product information

**When data is sent:**

 * During checkout – When customer initiates payment
 * During payment verification – When OTP is verified
 * During payment confirmation – When payment is processed
 * During webhook callbacks – When payment status is updated

**Who provides the service:**

Melon (https://getmelon.co) provides the payment infrastructure and API services.

**Service Links:**

 * Terms of Service: https://getmelon.co/terms
 * Privacy Policy: https://getmelon.co/privacy

## 安装

#### Automatic Installation

 1. Go to Plugins > Add New
 2. Search for “Melon Payment Gateway”
 3. Click “Install Now”
 4. Activate the plugin

#### Manual Installation

 1. Download the plugin zip file
 2. Go to Plugins > Add New > Upload Plugin
 3. Choose the zip file and click “Install Now”
 4. Activate the plugin

#### Configuration

 1. Navigate to Settings > Melon
 2. Enter your Melon API credentials:
 3.  * Base URL: Your Melon API base URL (e.g., https://staging-api.getmelon.co/api/
       v1)
     * Public Key: Your Melon public key (format: pk_live_* or pk_test_*)
     * Source: Source identifier (e.g., woocommerce)
     * Note: Origin is automatically detected from your WordPress site URL (no manual
       configuration needed)
 4. Go to Settings > Payments
 5. Enable and configure the Melon payment gateway
 6. Set the gateway title and description as desired

## 常见问题

### Does this plugin work with WooCommerce Blocks?

Yes, the plugin is fully compatible with both traditional and block-based checkout.

### What payment methods are supported?

The plugin supports two payment methods:
 * Melon Wallet – Direct wallet payments
with OTP verification * Payment Gateway – Card and mobile money via Paga

### Is OTP verification required?

OTP verification is required for new users or when the phone number is not validated.
Validated Melon IDs skip OTP verification automatically.

### How do I get my API credentials?

Contact Melon support at [getmelon.co](https://getmelon.co) to obtain your API credentials.

### Does the plugin support webhooks?

Yes, the plugin includes webhook support for payment confirmations from Paga. The
webhook endpoint is available at: `/wp-json/melon/v1/paga-webhook`

### What happens if a user doesn’t have a Melon wallet?

If a user hasn’t created a Melon wallet, the “Pay with Melon” option will be disabled
and “Pay with other options” will be automatically selected.

### Is the plugin mobile responsive?

Yes, all payment modals are fully mobile responsive and optimized for mobile devices.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Melon Payment Gateway for WooCommerce」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ getmelon ](https://profiles.wordpress.org/getmelon/)

[帮助将「Melon Payment Gateway for WooCommerce」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/melon-payment-gateway)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/melon-payment-gateway/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/melon-payment-gateway/)，或通过[RSS](https://plugins.trac.wordpress.org/log/melon-payment-gateway/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/melon-payment-gateway/)。

## 更新日志

#### 1.0.0

 * Initial release
 * Melon Wallet payment integration
 * Payment Gateway (Paga) integration
 * OTP verification flow
 * Wallet balance checking
 * Webhook support
 * Mobile-responsive modals
 * WooCommerce Blocks compatibility
 * Payment reference tracking
 * Complete API integration with real-time reference ID

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**5 月前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 5.8 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/melon-payment-gateway/)
 * 标签
 * [paga](https://cn.wordpress.org/plugins/tags/paga/)[payment gateway](https://cn.wordpress.org/plugins/tags/payment-gateway/)
   [wallet](https://cn.wordpress.org/plugins/tags/wallet/)[woocommerce](https://cn.wordpress.org/plugins/tags/woocommerce/)
 *  [高级视图](https://cn.wordpress.org/plugins/melon-payment-gateway/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/melon-payment-gateway/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/melon-payment-gateway/reviews/)

## 贡献者

 *   [ getmelon ](https://profiles.wordpress.org/getmelon/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/melon-payment-gateway/)