Title: Payment gateway for WooCommerce &#8211; Woo WeChatPay
Author: Alexandre Froger
Published: <strong>2018 年 11 月 2 日</strong>
Last modified: 2024 年 3 月 12 日

---

搜索插件

![](https://ps.w.org/woo-wechatpay/assets/banner-772x250.png?rev=2234214)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/woo-wechatpay/assets/icon.svg?rev=2234214)

# Payment gateway for WooCommerce – Woo WeChatPay

 作者：[Alexandre Froger](https://profiles.wordpress.org/frogerme/)

[下载](https://downloads.wordpress.org/plugin/woo-wechatpay.1.3.16.zip)

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

 [支持](https://wordpress.org/support/plugin/woo-wechatpay/)

## 描述

Woo WeChatPay is a companion plugin for WP Weixin that adds a WeChat Pay payment
gateway to WooCommerce-powered websites.
 Customers can pay both in the WeChat browser(
JSAPI), mobile browsers (H5), or from their computer via a QR code. Upon purchase
and if activated in settings, customers may receive a notification in the WeChat
Official Account with a templated message if they are a follower.

### Requirements

 * A [China Mainland WeChat Official Account](https://mp.weixin.qq.com) – **Service
   account**.
 * A [China Mainland WeChat Pay account](https://pay.weixin.qq.com).
 * **[WP Weixin](https://wordpress.org/plugins/wp-weixin)** installed, activated,
   enabled and properly configured.

### Important Notes

 * Does NOT support [cross-border payments](https://pay.weixin.qq.com/wechatpay_guide/intro_settle.shtml)(
   possibly planned for v1.4).
 * Make sure to read the “TROUBLESHOOT, FEATURE REQUESTS AND 3RD PARTY INTEGRATION”
   section below and [the full documentation](https://github.com/froger-me/woo-wechatpay/blob/master/README.md)
   before contacting the author.

### Overview

This plugin adds the following major features to WooCommerce and WP Weixin:

 * **Payment of WooCommerce orders in WeChat mobile app:** uses the WeChat JSAPI
   for a seamless experience.
 * **Payment of WooCommerce orders in mobile web browser app:** calls the WeChat
   H5 API for a seamless experience.
 * **Payment of WooCommerce orders with WeChat via QR Code:** for customers using
   WeChat Pay in classic browsers.
 * **Support for “pay again”:** allows customers to continue the payment process
   of Pending orders.
 * **Refund of WooCommerce orders:** possibility to refund orders manually in a 
   few clicks, and support for automatic refund in case the transaction failed.
 * **Templated message notification in WeChat:** send a WeChat templated message
   to the customer upon purchase (if following the Official Account – completely
   customisable via [filters](https://github.com/froger-me/woo-wechatpay/blob/master/README.md#user-content-filters)).
 * **Multi-currency support:** using an exchange rate against Chinese Yuan configured
   in the settings.

Compatible with [WooCommerce Multilingual](https://wordpress.org/plugins/woocommerce-multilingual/),
[WPML](http://wpml.org/), [Ultimate Member](https://wordpress.org/plugins/ultimate-member/),
[WordPress Multisite](https://codex.wordpress.org/Create_A_Network), and [many caching plugins](https://github.com/froger-me/wp-weixin/blob/master/README.md#user-content-object-cache-considerations).

### Troubleshoot, feature requests and 3rd party integration

Unlike most WeChat integration plugins, Woo WeChatPay is provided for free.

Woo WeChatPay is regularly updated, and bug reports are welcome, preferably on [Github](https://github.com/froger-me/woo-wechatpay/issues).
Each bug report will be addressed in a timely manner, but issues reported on WordPress
may take significantly longer to receive a response.

Woo WeChatPay has been tested with the latest version of WordPress and WooCommerce–
in case of issue, please ensure you are able to reproduce it with a default installation
of WordPress, WooCommerce plugin, and Storefront theme and any of the aforementioned
supported plugins if used before reporting a bug.

Feature requests (such as “it would be nice to have XYZ”) or 3rd party integration
requests (such as “it is not working with XYZ plugin” or “it is not working with
my theme”) will be considered only after receiving a red envelope (红包) of a minimum
RMB 500 on WeChat (guarantee of best effort, no guarantee of result).

To add the author on WeChat, click [here](https://froger.me/wp-content/uploads/2018/04/wechat-qr.png),
scan the WeChat QR code, and add “Woo WeChatPay” as a comment in your contact request.

## 屏幕截图

[⌊The WooCommerce checkout page with the WeChat Pay payment gateway in classic browsers.⌉⌊
The WooCommerce checkout page with the WeChat Pay payment gateway in classic browsers
.⌉[

The WooCommerce checkout page with the WeChat Pay payment gateway in classic browsers.

[⌊The WooCommerce checkout page with the WeChat Pay payment gateway in WeChat.⌉⌊
The WooCommerce checkout page with the WeChat Pay payment gateway in WeChat.⌉[

The WooCommerce checkout page with the WeChat Pay payment gateway in WeChat.

[⌊The QR code payment screen in classic browsers.⌉⌊The QR code payment screen in
classic browsers.⌉[

The QR code payment screen in classic browsers.

[⌊The WooCommerce WeChat Pay payment gateway settings page.⌉⌊The WooCommerce WeChat
Pay payment gateway settings page.⌉[

The WooCommerce WeChat Pay payment gateway settings page.

[⌊The WeChat Pay settings added to the WP Weixin settings page.⌉⌊The WeChat Pay 
settings added to the WP Weixin settings page.⌉[

The WeChat Pay settings added to the WP Weixin settings page.

## 安装

This section describes how to install the plugin and get it working.

 1. Upload the plugin files to the `/wp-content/plugins/woo-wechatpay` directory.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Edit plugin settings

## 评价

![](https://secure.gravatar.com/avatar/caa03cd896332cf470b1570adbc3b03802161d344b36cf479093151ee6133315?
s=60&d=retro&r=g)

### 󠀁[没有完整的教程，配置失败](https://wordpress.org/support/topic/%e6%b2%a1%e6%9c%89%e5%ae%8c%e6%95%b4%e7%9a%84%e6%95%99%e7%a8%8b%ef%bc%8c%e9%85%8d%e7%bd%ae%e5%a4%b1%e8%b4%a5/)󠁿

 [g12345](https://profiles.wordpress.org/g12345/) 2020 年 5 月 20 日

按照插件的要求填写了相关的各种密钥，但是到最后一步支付的时候仍然显示“处理结果时出
错，请重试”，无法支付，求帮助，如果有热心的大神，希望能帮助我，我的邮箱：978942332@qq.
com。 Filled in the relevant keys according to the requirements of the plug-in, 
but the last step of payment still shows “An error occurred while processing the
results, please try again” ，my Email:978942332@qq.com

![](https://secure.gravatar.com/avatar/ac96d6ee8016aef6e4286b3035cd8ec47bd8399979c71c54a986cd3120fe0c8c?
s=60&d=retro&r=g)

### 󠀁[good software](https://wordpress.org/support/topic/good-software-9/)󠁿

 [zhoufann9188](https://profiles.wordpress.org/zhoufann9188/) 2020 年 2 月 27 日

唯一使用微信支付无BUG的软件，可见作者对软件的细致及用心。

![](https://secure.gravatar.com/avatar/68f9c512798059888f5d8eaddc37ec048ac1add00acbaa0468f96d7f2eff960c?
s=60&d=retro&r=g)

### 󠀁[Works fine, many thanks!](https://wordpress.org/support/topic/works-fine-many-thanks/)󠁿

 [rogerxincn](https://profiles.wordpress.org/rogerxincn/) 2020 年 2 月 22 日

Adopted in my website for more than one week, so far so good. To use this plugin,
wp weixin plugin need to be installed first, after setting finished,in Woocommerce
payment tools page, wechat pay will be showed in the list. what you need to do is
click on-button. The developer even design some pages for the wechat,like checkout
page and call back page, mobile device also work fine. Thanks.

![](https://secure.gravatar.com/avatar/d282f9fc09ca3044538db9527de5a5a414ae28522bf5324d3f16ccdb7cafb6a3?
s=60&d=retro&r=g)

### 󠀁[多谢，非常好用的插件。](https://wordpress.org/support/topic/%e5%a4%9a%e8%b0%a2%ef%bc%8c%e9%9d%9e%e5%b8%b8%e5%a5%bd%e7%94%a8%e7%9a%84%e6%8f%92%e4%bb%b6%e3%80%82/)󠁿

 [alexlii](https://profiles.wordpress.org/alexlii/) 2018 年 11 月 13 日

多谢，到目前为止发现最好用的插件。 多谢作者的贡献。

![](https://secure.gravatar.com/avatar/e608c6d4b21cc411fe80a10ca593d858a4543bf9be9b308d42cc67dc772e905c?
s=60&d=retro&r=g)

### 󠀁[Very powerful！](https://wordpress.org/support/topic/very-powerful%ef%bc%81/)󠁿

 [秦朝往事](https://profiles.wordpress.org/kzgzs/) 2024 年 4 月 5 日 1 回复

<!– wp:paragraph –> <p class=””> 事实上，微信方面已经对海外所有人开放了。微信资料
可以以海外护照认证，可以绑定信用卡。支付宝也一样。</p> <!– /wp:paragraph –>

 [ 阅读所有5条评价 ](https://wordpress.org/support/plugin/woo-wechatpay/reviews/)

## 贡献者及开发者

「Payment gateway for WooCommerce – Woo WeChatPay」是开源软件。 以下人员对此插件
做出了贡献。

贡献者

 *   [ Alexandre Froger ](https://profiles.wordpress.org/frogerme/)

「Payment gateway for WooCommerce – Woo WeChatPay」插件已被翻译至 1 种本地化语言。
感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/woo-wechatpay/contributors)
为本插件所做的贡献。

[帮助将「Payment gateway for WooCommerce – Woo WeChatPay」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/woo-wechatpay)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.3.16

 * Remove WooCommerce compatbility tag (reason: irrelevant)
 * WordPress tested up to: 6.4.3

#### 1.3.15

 * Commit to ensure compatibility until WP Weixin 1.4

#### 1.3.14

 * Bugfix: version sync

#### 1.3.13

 * WP Weixin tested up to: 1.3.13

#### 1.3.12

 * WordPress tested up to: 5.4.1
 * WP Weixin tested up to: 1.3.12

#### 1.3.11

 * WC tested up to: 4.0.0
 * WP Weixin tested up to: 1.3.11
 * Translation updates

#### 1.3.10

 * WC tested up to: 3.9.2
 * WP Weixin tested up to: 1.3.10

#### 1.3.9

 * WC tested up to: 3.9.1
 * WP Weixin tested up to: 1.3.9

#### 1.3.8

 * WP Weixin tested up to: 1.3.8
 * Minor fixes

#### 1.3.7

 * WP Weixin tested up to: 1.3.7

#### 1.3.6

 * Added email notification to admin in case of rare edge case of paid WeChat Pay
   transaction with order not found in WooCommerce
 * Minor bugfix & optimisation
 * WC tested up to: 3.9.0
 * Change plugin display name to comply with WordPress guidelines more tightly

#### 1.3.5

 * Bump version to match WP Weixin
 * Require WP Weixin v1.3.5
 * Remove commented code
 * Add call to `wp_weixin_ajax_safe`
 * Add support for mobile web browsers using the H5 API, with gateway configuration
   and WeChat merchant platform backend help

#### 1.3

 * Major overall code refactor
 * Multisite support
 * Use new [WP Weixin](https://wordpress.org/plugins/wp-weixin) functions instead
   of using the classes directly
 * Use WooCommerce logger everywhere
 * Refund reason sent to WeChat
 * Ensure compatibility with other plugins using WeChat Pay API
 * Add `woo_wechatpay_templated_message` action hook
 * Disable all the Alipay-related payment gateways (looking for `alipay` or `zhifubao`
   in the gateway ID) in WeChat browser by default to prevent conflicts
 * Rename `pay-again.php` template file to `redirected-pay.php`.
 * Add `woowechatpay_filter_wechat_gateways` filter to control the available payment
   gateways in WeChat browser
 * Attempt to refund order automatically in case of failure
 * Update checkout script (fix undefined index has_full_address warning)
 * Update documentation
 * Update translation

Special thanks:

 * Thanks @alexlii for extensive testing, translation, suggestions and donation!
 * Thanks @lssdo for translation
 * Thanks @kzgzs for improvement suggestions

#### 1.2

 * Preserve cart on checkout
 * Mobile WeChat payment: do not leave checkout when payment is cancelled
 * Handle refunds via WeChat Pay
 * Adjust methods visibility
 * Add WooCommerce logger
 * Fix currency rate conversion
 * Add gateway description

#### 1.1.1

 * Better error log
 * Fix “pay again”

#### 1.1

 * Public plugin on WordPress repository

#### 1.0.5

 * Remove WP Package Updater – no more private plugin, please update to the public
   plugin (v1.1)

#### 1.0.4

 * Adjust rewrite rules registration

#### 1.0.3

 * Rearrange hooks firing sequence
 * Add icons and banners
 * Add readme.txt

#### 1.0.2

 * Coding standards

#### 1.0.1

 * Add WP Package Updater

#### 1.0

 * First version

## 额外信息

 *  版本 **1.3.16**
 *  最后更新：**2 年前**
 *  活跃安装数量 **80+**
 *  WordPress 版本 ** 4.9.5 或更高版本 **
 *  已测试的最高版本为 **6.4.8**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [Chinese (China)](https://cn.wordpress.org/plugins/woo-wechatpay/) 和 [English (US)](https://wordpress.org/plugins/woo-wechatpay/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/woo-wechatpay)
 * 标签
 * [payments](https://cn.wordpress.org/plugins/tags/payments/)[wechat](https://cn.wordpress.org/plugins/tags/wechat/)
   [wechat payments](https://cn.wordpress.org/plugins/tags/wechat-payments/)[wechatpay](https://cn.wordpress.org/plugins/tags/wechatpay/)
   [weixin](https://cn.wordpress.org/plugins/tags/weixin/)
 *  [高级视图](https://cn.wordpress.org/plugins/woo-wechatpay/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  5 条 5 星评价     ](https://wordpress.org/support/plugin/woo-wechatpay/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/woo-wechatpay/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/woo-wechatpay/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/woo-wechatpay/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/woo-wechatpay/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/woo-wechatpay/reviews/#new-post)

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

## 贡献者

 *   [ Alexandre Froger ](https://profiles.wordpress.org/frogerme/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/woo-wechatpay/)