Title: WPKJ Payment Gateway for FluentCart with Alipay
Author: cmhello
Published: <strong>13. November 2025</strong>
Last modified: 23. Januar 2026

---

Plugins suchen

![](https://ps.w.org/wpkj-alipay-gateway-for-fluentcart/assets/banner-772x250.png?
rev=3409620)

![](https://ps.w.org/wpkj-alipay-gateway-for-fluentcart/assets/icon-256x256.png?
rev=3394855)

# WPKJ Payment Gateway for FluentCart with Alipay

 Von [cmhello](https://profiles.wordpress.org/cmhello/)

[Herunterladen](https://downloads.wordpress.org/plugin/wpkj-alipay-gateway-for-fluentcart.1.1.1.zip)

 * [Details](https://de.wordpress.org/plugins/wpkj-alipay-gateway-for-fluentcart/#description)
 * [Rezensionen](https://de.wordpress.org/plugins/wpkj-alipay-gateway-for-fluentcart/#reviews)
 *  [Installation](https://de.wordpress.org/plugins/wpkj-alipay-gateway-for-fluentcart/#installation)
 * [Entwicklung](https://de.wordpress.org/plugins/wpkj-alipay-gateway-for-fluentcart/#developers)

 [Support](https://wordpress.org/support/plugin/wpkj-alipay-gateway-for-fluentcart/)

## Beschreibung

WPKJ Payment Gateway for FluentCart with Alipay is a feature-rich, enterprise-grade
payment gateway that seamlessly integrates Alipay with FluentCart. It intelligently
detects user environments and automatically selects the optimal payment interface.

#### Key Features

 * **Multi-Platform Payment Support**
    - PC Web Payment for desktop browsers
    - Mobile WAP Payment for mobile browsers
    - Face-to-Face Payment with QR codes
    - Alipay App Payment for native experience [Not yet completed]
 * **Advanced Subscription Management**
    - Automatic Renewal via Alipay Recurring Agreement
    - Manual Renewal fallback mode
    - Trial period support (0-365 days)
    - Flexible billing intervals (daily, weekly, monthly, yearly)
    - Limited and unlimited billing cycles
    - Subscription cancellation sync with orders
 * **Comprehensive Refund System**
    - Automatic refunds when orders are cancelled
    - Manual refund processing from admin
    - Full and partial refund support
    - Detailed activity logging
 * **Enterprise Security**
    - RSA2 2048-bit encryption
    - Signature verification for all requests
    - HTTPS/SSL required for production
    - Webhook validation
    - Amount verification
 * **International & Multi-Currency**
    - 14+ currencies supported
    - Full internationalization (i18n) ready
    - Translation template (POT) included
    - Built-in Chinese & English translations

#### Supported Currencies

CNY (Chinese Yuan), USD, EUR, GBP, HKD, JPY, KRW, SGD, AUD, CAD, CHF, NZD, THB, 
MYR

#### Requirements

 * FluentCart 1.2.0 or higher
 * WordPress 6.5 or higher
 * PHP 8.2 or higher
 * SSL Certificate (HTTPS) for production
 * Alipay merchant account

#### Developer Friendly

 * Clean PSR-4 autoloading architecture
 * Comprehensive hooks and filters
 * Debug logging support
 * Sandbox/Test mode
 * Extensive documentation

### Support and Documentation

For comprehensive documentation, tutorials, and support:

 * **Official Website**: [https://www.wpdaxue.com](https://www.wpdaxue.com)
 * **Documentation**: [https://www.wpdaxue.com/wpkj-alipay-gateway-for-fluentcart.html](https://www.wpdaxue.com/wpkj-alipay-gateway-for-fluentcart.html)
 * **Support Email**: support@wpdaxue.com
 * **GitHub**: Report issues and contribute

### Privacy and Data

This plugin does NOT:
 – Collect any user data – Send data to third parties (except
Alipay for payment processing) – Track users – Store sensitive payment information

Payment data is transmitted securely via HTTPS directly to Alipay’s servers. The
plugin only stores transaction IDs and order metadata necessary for order fulfillment.

### External Services

This plugin relies on external services for payment processing. Below is documentation
for each external service:

### Alipay Payment Gateway (Production)

**Service**: Alipay Payment Gateway API
 **What it is**: Official payment processing
service operated by Alipay, a leading Chinese payment platform **What it’s used 
for**: Process online payments from customers using Alipay accounts **Data sent**:
Order ID, order amount, customer email, payment description/subject, currency, and
timeout configuration **When it’s sent**: When a customer initiates a payment and
selects Alipay as the payment method **Data sent to**: Alipay servers (https://openapi.
alipay.com/gateway.do for production) **Terms of Service**: https://render.alipay.
com/p/yuyan/180020010001196791/preview.html?agreementId=AG00000006 **Privacy Policy**:
https://render.alipay.com/p/yuyan/180020010001196791/preview.html?agreementId=AG00000132**
Additional Info**: Communication is RSA2 2048-bit encrypted. Alipay returns trade
status, transaction ID, and buyer information

### Alipay Sandbox API (Testing)

**Service**: Alipay Sandbox API
 **What it is**: Test environment provided by Alipay
for merchants to test payment integration before going live **What it’s used for**:
Process test/sandbox payments when the plugin is in test mode **Data sent**: Same
as production (Order ID, amount, email, subject, currency, timeout) **When it’s 
sent**: When plugin is configured in test mode and customer initiates a test payment**
Data sent to**: Alipay sandbox servers (https://openapi-sandbox.dl.alipaydev.com/
gateway.do) **Terms of Service**: https://render.alipay.com/p/yuyan/180020010001196791/
preview.html?agreementId=AG00000006 **Privacy Policy**: https://render.alipay.com/
p/yuyan/180020010001196791/preview.html?agreementId=AG00000132 **Additional Info**:
Uses separate test credentials from production

### User Consent

Users are informed about Alipay payment processing when they select Alipay as their
payment method. They accept data transmission to Alipay’s services as part of the
payment process. The Alipay terms and privacy policy are accessible via links above.

### Credits

 * Developed by: WPDAXUE.COM
 * Contributors: WordPress community
 * Framework: FluentCart Payment Gateway API
 * Special Thanks: FluentCart team for excellent payment framework, and Alipay for
   their robust payment solution

## Screenshots

[⌊Alipay payment gateway in FluentCart payment list⌉⌊Alipay payment gateway in FluentCart
payment list⌉[

Alipay payment gateway in FluentCart payment list

[⌊Alipay payment gateway settings page with all configuration options⌉⌊Alipay payment
gateway settings page with all configuration options⌉[

Alipay payment gateway settings page with all configuration options

[⌊Payment method selection during checkout⌉⌊Payment method selection during checkout⌉[

Payment method selection during checkout

[⌊Desktop Face-to-Face QR code payment page⌉⌊Desktop Face-to-Face QR code payment
page⌉[

Desktop Face-to-Face QR code payment page

[⌊Payment receipt⌉⌊Payment receipt⌉[

Payment receipt

## Installation

#### Automatic Installation

 1. Log in to your WordPress admin panel
 2. Navigate to Plugins > Add New
 3. Search for „WPKJ Payment Gateway for FluentCart with Alipay“
 4. Click „Install Now“ and then „Activate“
 5. Go to FluentCart > Settings > Payment Methods
 6. Configure your Alipay credentials

#### Manual Installation

 1. Download the plugin ZIP file
 2. Upload to `/wp-content/plugins/wpkj-fluentcart-alipay-payment/`
 3. Activate through the ‚Plugins‘ menu in WordPress
 4. Navigate to FluentCart > Settings > Payment Methods
 5. Configure Alipay gateway settings
 6. Enable the payment method

#### Configuration Steps

 1. **Obtain Credentials from Alipay:**
 2.  * Register at [Alipay Open Platform](https://open.alipay.com/)
     * Create a new application
     * Generate RSA2 key pair
     * Upload public key to Alipay
     * Get your 16-digit App ID
     * Copy Alipay’s public key
 3. **Configure Plugin Settings:**
 4.  * Enter App ID, Private Key, and Alipay Public Key
     * Configure Notify URL in Alipay dashboard
     * Enable auto-refund (optional)
     * Enable Face-to-Face payment (optional)
     * For subscriptions: Enter Personal Product Code
 5. **Test Your Setup:**
 6.  * Use sandbox mode for testing
     * Make a test purchase
     * Verify webhook notifications
     * Test refund functionality

## FAQ

### Where do I get Alipay credentials?

Register for a merchant account at [Alipay Open Platform](https://open.alipay.com/).
After creating an application, you’ll receive an App ID and can generate RSA key
pairs for secure communication.

### Does this plugin support subscription payments?

Yes! The plugin fully supports FluentCart subscriptions with two modes:
 1. **Automatic
Renewal** (Recommended) – Requires Alipay recurring payment service 2. **Manual 
Renewal** – Fallback mode, works for all merchants

### Can I test before going live?

Absolutely! Use Alipay’s sandbox environment for testing. Configure test credentials
in the plugin settings and make test transactions before enabling live mode.

### What currencies are supported?

The plugin supports 14+ currencies including CNY, USD, EUR, GBP, HKD, JPY, KRW, 
SGD, AUD, CAD, CHF, NZD, THB, and MYR.

### How do refunds work?

Refunds can be processed in two ways:
 1. **Automatic** – Enable auto-refund, and
cancelling orders triggers instant refunds 2. **Manual** – Process refunds from 
FluentCart admin panel

Both full and partial refunds are supported.

### Is the plugin translation ready?

Yes, the plugin is fully internationalized with a POT file included. Chinese and
English translations are built-in. You can translate to any language using tools
like Poedit.

### What happens if webhook notifications fail?

The plugin includes a payment status checker that polls Alipay for payment confirmation
if webhooks fail. This ensures reliable payment processing even with network issues.

### Can I customize the payment flow?

Yes! The plugin provides numerous hooks and filters for customization:
 – Modify
payment parameters – Custom notify/return URLs – Custom payment subject lines – 
Integration with your custom workflows

### Does it work on mobile devices?

Yes! The plugin automatically detects mobile devices and uses Alipay’s mobile WAP
payment interface for mobile experience.

### What about Face-to-Face payments?

Enable QR code payments in settings. Customers can scan QR codes with their Alipay
app for offline/in-store payments.

## Rezensionen

Zu diesem Plugin liegen noch keine Rezensionen vor.

## Mitwirkende und Entwickler

„WPKJ Payment Gateway for FluentCart with Alipay“ ist Open-Source-Software. Folgende
Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

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

„WPKJ Payment Gateway for FluentCart with Alipay“ wurde in 1 Sprache übersetzt. 
Danke an [die Übersetzer](https://translate.wordpress.org/projects/wp-plugins/wpkj-alipay-gateway-for-fluentcart/contributors)
für ihre Mitwirkung.

[Übersetze „WPKJ Payment Gateway for FluentCart with Alipay“ in deine Sprache.](https://translate.wordpress.org/projects/wp-plugins/wpkj-alipay-gateway-for-fluentcart)

### Interessiert an der Entwicklung?

[Durchstöbere den Code](https://plugins.trac.wordpress.org/browser/wpkj-alipay-gateway-for-fluentcart/),
sieh dir das [SVN-Repository](https://plugins.svn.wordpress.org/wpkj-alipay-gateway-for-fluentcart/)
an oder abonniere das [Entwicklungsprotokoll](https://plugins.trac.wordpress.org/log/wpkj-alipay-gateway-for-fluentcart/)
per [RSS](https://plugins.trac.wordpress.org/log/wpkj-alipay-gateway-for-fluentcart/?limit=100&mode=stop_on_copy&format=rss).

## Änderungsprotokoll

#### 1.1.1

Release Date: January 23, 2026

 * Performance: Refactored payment status checker and refund processor to use lazy
   initialization for Alipay API instances
 * Performance: Improved resource usage by deferring API initialization until actually
   needed
 * Security: Enhanced error handling with proper exception catching and logging 
   during API initialization
 * Improvement: Added getAPI() method to gracefully handle API initialization failures
 * Improvement: Better error response when API instance is unavailable during payment
   status queries
 * Improvement: Enhanced exception safety in PaymentStatusChecker and RefundProcessor
   classes

#### 1.1.0

Release Date: November 29, 2025

 * Update: Plugin name changed to „WPKJ Payment Gateway for FluentCart with Alipay“
 * Update: Plugin author and copyright information updated to WPDAXUE.COM
 * Update: All brand and link information adjusted in README and documentation
 * Update: Version number synchronized to 1.1.0 with changelog
 * Improvement: Plugin activation and dependency check prompt text corrected
 * Improvement: Redundant code removed from text fields to simplify logic
 * Update: Project name and author fields updated in language files

#### 1.0.9

Release Date: November 12, 2025

 * Security: Renamed nonce field to `wpkj_alipay_f2f_nonce` to prevent conflicts
   with other plugins
 * Security: Updated nonce action name to `wpkj_alipay_f2f_check_payment_status_nonce`
   for better uniqueness
 * Security: Removed external QR code generation via api.qrserver.com – now uses
   local QRCode.js library only
 * Security: Renamed POST field from generic `nonce` to `wpkj_alipay_f2f_nonce` 
   in Face-to-Face payment AJAX handler
 * Security: Added phpcs annotations for webhook nonce verification exceptions (
   Alipay server requests don’t require WordPress nonce)
 * Security: Changed wp_redirect() to wp_safe_redirect() in FaceToFacePageHandler
   to prevent malicious redirects
 * Improvement: Optimized POST data processing in webhook handler – now only extracts
   required fields
 * Improvement: Refined Alipay notification field handling for better security and
   reduced data exposure
 * Improvement: Removed unused webhook fields (send_pay_date, gmt_create) – only
   processes necessary fields
 * Improvement: Updated NotifyHandler to only handle essential Alipay notification
   fields
 * Fixed: Corrected required fields list in webhook notification processing
 * Fixed: Logger::debug() method call replaced with Logger::info() in OrderCancelListener
   and TransactionHelper
 * Fixed: Plugin directory name updated to wpkj-alipay-gateway-for-fluentcart to
   match WordPress.org slug
 * Refactoring: PaymentStatusChecker nonce verification now uses unique field and
   action names
 * Refactoring: FaceToFacePageHandler nonce generation updated to match new naming
   convention
 * Refactoring: JavaScript Face-to-Face payment handler uses new nonce field name
 * Compliance: All changes comply with WordPress.org plugin directory standards 
   and security guidelines
 * Note: Nonce field renamed in multiple files: PaymentStatusChecker.php, FaceToFacePageHandler.
   php, face-to-face-payment.js
 * Note: NotifyHandler.php updated with proper phpcs annotations for webhook data
   handling
 * Note: No functional impact – only security and naming improvements

#### 1.0.8

Release Date: October 23, 2025

 * New: Added Custom Payment API for external system integration
 * New: REST API endpoints for programmatically creating payment orders
 * New: Support for one-time and subscription payments via API
 * New: Payment status query API endpoint
 * New: Comprehensive API documentation with usage examples
 * Enhancement: Customizable permission checks for API access
 * Enhancement: Detailed logging for custom payment operations
 * Documentation: Added CUSTOM_PAYMENT_USAGE.md with complete API guide
 * Documentation: All documentation moved to docs/ directory for better organization
 * Documentation: README.md retained in root for GitHub, readme.txt for WordPress.
   org
 * Security: All exception messages properly escaped with phpcs annotations
 * Security: Example code properly annotated for demonstration purposes

#### 1.0.7

Release Date: October 23, 2025

 * Fixed: Critical issue where next_billing_date was not set for initial subscription
   payments
 * Fixed: Subscription renewal not triggering due to missing next billing date
 * Fixed: Next billing date not set after recurring agreement sign success
 * Fixed: Critical issue where bill_count was not properly calculated for subscriptions
 * Fixed: Initial subscription payment showing bill_count as 0 instead of 1
 * Fixed: Manual bill_count increment replaced with FluentCart’s automatic calculation
 * Fixed: Auto-cancel subscription feature not working – was using wrong field to
   find subscription
 * Fixed: OrderCancelListener now correctly uses Subscription->parent_order_id instead
   of Order->subscription_id
 * Security: Enhanced duplicate refund prevention mechanism in automatic refund 
   feature
 * Security: Now checks ALL existing refunds instead of just first one to prevent
   duplicates
 * Security: Added comprehensive logging for refund duplicate prevention
 * Security: Validates original transaction UUID match before blocking duplicate
   refunds
 * Refactoring: Migrated to FluentCart standard Refund service for all refund operations
 * Refactoring: Simplified AlipayGateway processRefund() method to only handle API
   calls (~80% code reduction)
 * Refactoring: Simplified RefundProcessor to use FluentCart’s transaction/order
   management (~60% code reduction)
 * Refactoring: Created centralized SubscriptionService class eliminating ~240 lines
   of duplicate code
 * Refactoring: NotifyHandler and PaymentStatusChecker now use shared subscription
   service
 * Refactoring: Architecture now consistent with WeChat payment plugin
 * Improved: FluentCart now handles all transaction creation, order updates, and
   event triggering
 * Improved: Better separation of concerns – Gateway handles payment API, FluentCart
   handles business logic
 * Improved: Added source tracking (webhook/polling) for better debugging
 * Improved: Code maintainability with DRY principle – single source of truth for
   subscription and refund logic
 * Improved: Initial subscription payment now properly sets next_billing_date using
   FluentCart’s guessNextBillingDate()
 * Improved: Now using SubscriptionService::syncSubscriptionStates() to auto-calculate
   bill_count from database
 * Improved: Proper EOT (End of Term) detection based on actual transaction count
 * Improved: Enhanced logging for subscription billing date and bill_count updates
 * Improved: Better handling of trial periods in next billing date calculation
 * Improved: Order cancellation flow now properly identifies and cancels associated
   subscriptions
 * Improved: Automatic refund now includes detailed security check logs
 * Note: This fix ensures FluentCart’s cron system can properly schedule subscription
   renewals
 * Note: bill_count is now automatically calculated by querying OrderTransaction
   records
 * Note: Total code reduced by ~35 lines, duplicate code eliminated completely
 * Note: In FluentCart, subscriptions are linked via Subscription->parent_order_id,
   not Order->subscription_id
 * Note: Duplicate refund prevention protects against concurrent order cancellation
   operations

#### 1.0.6

Release Date: October 23, 2025

 * Added: TransactionHelper utility class for idempotency protection
 * Added: Automatic retry mechanism for failed subscription renewals
 * Added: WordPress Cron-based renewal retry scheduling
 * Added: Comprehensive error handling and logging for renewals
 * Improved: Subscription renewal process with FluentCart standard methods
 * Improved: Exception message security with esc_html() escaping
 * Improved: Timezone safety using gmdate() instead of date()
 * Fixed: WordPress coding standards compliance
 * Fixed: Translator comments for all placeholder strings
 * Security: Enhanced XSS protection for all output
 * Performance: Optimized transaction lookup and duplicate detection

#### 1.0.5

Release Date: October 22, 2025

 * Added: Translator comments for all placeholder strings
 * Added: Comprehensive POT translation template
 * Improved: Subscription cancellation sync with order cancellation
 * Improved: UTF-8 encoding handling for Chinese characters
 * Improved: Face-to-Face payment amount formatting
 * Fixed: Order number display in payment subject
 * Fixed: Multiple placeholder string ordering for proper translation
 * Updated: Documentation with detailed configuration guide
 * Performance: Optimized webhook processing

#### 1.0.4

Release Date: October 21, 2025

 * Added: Automatic subscription cancellation when parent order is cancelled
 * Added: Configurable subscription cancellation behavior
 * Improved: Recurring agreement handling
 * Improved: Error messages and logging
 * Fixed: Subscription status synchronization issues

#### 1.0.3

Release Date: October 20, 2025

 * Added: Face-to-Face QR code payment support
 * Added: Enhanced mobile device detection
 * Fixed: UTF-8 encoding issues with Chinese characters
 * Fixed: Subject line truncation for long product names
 * Improved: Payment page rendering performance

#### 1.0.2

Release Date: October 18, 2025

 * Added: Automatic refund feature
 * Added: Refund activity logging
 * Improved: Webhook security validation
 * Fixed: Amount mismatch detection
 * Fixed: Timezone issues with Beijing time

#### 1.0.1

Release Date: October 16, 2025

 * Added: Full subscription payment support
 * Added: Recurring agreement integration
 * Added: Trial period handling
 * Improved: Error handling and logging
 * Fixed: Cart session cleanup for repeat purchases

#### 1.0.0

Release Date: October 15, 2025

 * Initial release
 * Multi-platform payment support (PC, Mobile, App)
 * Automatic client detection
 * Basic refund functionality
 * Multi-currency support
 * Test mode/Sandbox support
 * Webhook notification handling
 * i18n/l10n ready

## Meta

 *  Version **1.1.1**
 *  Zuletzt aktualisiert **vor 9 Monaten**
 *  Aktive Installationen **weniger als 10**
 *  WordPress-Version ** 6.5 oder höher **
 *  Getestet bis **6.9.9**
 *  PHP-Version ** 8.2 oder höher **
 *  Sprachen
 * [Chinese (China)](https://cn.wordpress.org/plugins/wpkj-alipay-gateway-for-fluentcart/)
   und [English (US)](https://wordpress.org/plugins/wpkj-alipay-gateway-for-fluentcart/).
 *  [Übersetze in deine Sprache](https://translate.wordpress.org/projects/wp-plugins/wpkj-alipay-gateway-for-fluentcart)
 * Schlagwörter
 * [alipay](https://de.wordpress.org/plugins/tags/alipay/)[china-payment](https://de.wordpress.org/plugins/tags/china-payment/)
   [fluentcart](https://de.wordpress.org/plugins/tags/fluentcart/)[payment gateway](https://de.wordpress.org/plugins/tags/payment-gateway/)
 *  [Erweiterte Ansicht](https://de.wordpress.org/plugins/wpkj-alipay-gateway-for-fluentcart/advanced/)

## Bewertungen

Es wurden noch keine Rezensionen eingereicht.

[Deine Rezension](https://wordpress.org/support/plugin/wpkj-alipay-gateway-for-fluentcart/reviews/#new-post)

[Alle Rezensionen anzeigen](https://wordpress.org/support/plugin/wpkj-alipay-gateway-for-fluentcart/reviews/)

## Mitwirkende

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

## Support

Möchtest du etwas mitteilen? Brauchst du Unterstützung?

 [Support-Forum anzeigen](https://wordpress.org/support/plugin/wpkj-alipay-gateway-for-fluentcart/)

## Spenden

Möchtest du die Weiterentwicklung dieses Plugins unterstützen?

 [ Für dieses Plugin spenden ](https://www.wpdaxue.com/wpkj-alipay-gateway-for-fluentcart.html)