Payment gateways ::: paygw_wechat
Maintained by Dan Marsden, Catalyst IT
WeChat payment gateway for Moodle.
Latest release:
10 sites
4 fans
Current versions available: 1

This plugin was developed with funding from Xi’an Jiaotong-Liverpool University by Catalyst IT 

The plugin allows you to accept payments via WeChat in your Moodle site.

Note: this plugin uses the WeChat SDK which must be downloaded separately before installing this plugin.

The PHP SDK is available here: https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=11_1 

Copy the 5 files from the "lib" folder in the zip supplied above into the .extlib/wechatsdk folder in your plugin. you should have the following files in the following location:

  • /payment/gateway/wechat/.extlib/wechatsdk/WxPay.Api.php
  • /payment/gateway/wechat/.extlib/wechatsdk/WxPay.Config.Interface.php
  • /payment/gateway/wechat/.extlib/wechatsdk/WxPay.Data.php
  • /payment/gateway/wechat/.extlib/wechatsdk/WxPay.Exception.php
  • /payment/gateway/wechat/.extlib/wechatsdk/WxPay.Notify.php

Then install the plugin into your site like normal.

For more information see the README file:


Screenshot #0
Screenshot #1


Dan Marsden (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Wed, May 19, 2021, 8:20 AM
    Approval issue created: CONTRIB-8555
  • Wed, May 19, 2021, 10:30 AM
    Dan Great job! Will try it now. I have been waiting for this for such a long time.
  • Wed, May 19, 2021, 10:49 AM
    Good to hear it will be useful!- the main thanks goes to XJTLU who sponsored this - keep in mind that we haven't rolled this out into production quite yet, so feel free to report any issues you have to the github tracker!
  • Fri, May 21, 2021, 11:34 AM
    Awesome. Good work. This will be popular.
  • Wed, May 26, 2021, 11:04 AM
    Hi Dan, I installed the plugin and finished the setting, but saw this error when testing. I made a screen capture, which you can see it through this link: . It looks like the QR codes fails to load at the last step. Normally, we scan to pay at this step on PC web sites. Please give me some advice, thanks a lot.
  • Wed, May 26, 2021, 11:20 AM
    try hitting the "test.php" file in your browser - /payment/gateways/wechat/test.php - it should display a qr code if your settings are correct. If it doesn't show a QR code it suggests something else is wrong.

    Also - make sure you've got the latest version of the plugin installed - we had some issues with point values in the earlier versions.
  • Wed, May 26, 2021, 4:34 PM
Please login to post comments