New Version WeChat Mini Program Release Guide
Published: 2020-11-05
I. Preliminary Preparation
1. Register a Mini Program
Merchants need to click the "Register Now" button in the upper right corner of the official homepage of the WeChat Public Platform (https://mp.weixin.qq.com/) to register a WeChat Mini Program account.

2. Improve Mini Program Information
After registering the Mini Program, log in to the Mini Program backend homepage and click [Fill in] to improve the Mini Program information, such as name, icon, description, etc.;

3. WeChat Pay (skip this chapter if online payment function is not required)
3.1 Apply for WeChat Pay
If you use a Mini Program involving online payment such as a mall-type Mini Program, you need to apply for entity certification. After approval, you can apply for WeChat Pay. Personal Mini Programs do not currently support applying for WeChat Pay.

3.2 Obtain WeChat Pay Parameters
After successfully applying for Mini Program WeChat Pay, log in to the WeChat Pay Merchant Platform via the link https://pay.weixin.qq.com to obtain the merchant number, merchant key, and download the API payment certificate. The instructions for obtaining each parameter are as follows:
3.2.1 Obtain Merchant Number
Click the "Account Center" -> "Merchant Information" menu to obtain the WeChat Pay merchant number, as shown in the figure below;

3.2.2 Merchant Key
Click the "Account Center" -> "API Security" menu, set a 32-bit key and record/back it up, as shown in the figure below;
Note: Incorrect key entry will cause payment abnormalities. If it is modified during this period, please log in to the mall backend again and modify the parameters synchronously.

3.2.3 Obtain API Certificate
Note: Please be sure to follow the operation process to download the certificate. During this period, do not close the tool or other related programs. If the tool is closed after the certificate is generated, the certificate cannot be downloaded and can only be regenerated after waiting 48 hours. (The certificate can only be generated 3 times a year; please keep it safe after downloading.)
I. How to determine whether the certificate type is [API Certificate issued by an authoritative CA]
Log in to the WeChat Pay Merchant Platform and click API Security. If the page shown in the figure below appears, it is an API Certificate issued by an authoritative CA.

II. How to obtain the API Certificate
Note: Obtaining the API certificate requires the super administrator of the merchant number to operate.
1. Click the [Apply for Certificate] button in API Security, and click Download to download the certificate tool.
Note: You can also directly visit this link https://wx.gtimg.com/mch/files/WXCertUtil-1.0.zip to download the certificate tool.

2. After downloading the certificate, open the certificate tool and click [Apply for Certificate].

3. After opening the certificate tool, return to the WeChat Pay Merchant Platform and click [Copy Here] to copy the merchant number and merchant name.
Note: so that the product and merchant name can be copied to the system clipboard.

4. After copying the merchant number and merchant name, click to switch to [Certificate Tool], click the [Paste] button in the upper right corner, paste the previously copied merchant number and merchant name into the certificate tool, and then click [Next].

5. After clicking Next, the page will generate a certificate string point. Click the [Copy] button in the upper right corner to copy the certificate string point. After copying, click Next.

6. After copying the certificate string point in the certificate tool, return to [WeChat Pay Merchant Platform], paste the copied certificate request string into the page for generating the aid certificate, enter the SMS verification code and operation password, and click Next.

7. After clicking Next, a certificate string will be generated [at this point the system will consider the certificate application successful]. Click [Copy Certificate Content].

8. After copying the certificate content, switch to the [Certificate Tool] page, click the Paste button to paste the [Certificate String] into the certificate tool page, and click Next to generate the certificate file and private key file.

9. After clicking Next, a window will pop up allowing you to save the document. Select the folder where you want to save it, and the certificate download will be completed. You can view your certificate in the document.
Note: Be sure to create a new document first, then you can place the downloaded certificate in the folder to avoid loss.

After downloading the certificate file, decompress it. Later, you need to upload "apiclient_cert.p12" as shown in the figure to the mall backend.

II. Mini Program Release
1. Online Upload
Online upload is to authorize the Mini Program to the platform, and you can directly complete Mini Program editing, Mini Program review, and Mini Program release operations on the platform. It is convenient and quick, suitable for general users.
1.1 Authorization Binding
Log in to the management backend, click the [Store] menu -> click [Publish Mini Program], select [Publish Mini Program on Platform], and have the Mini Program administrator scan the QR code to authorize binding;

Note that the following permissions must be selected during authorization; missing selections may cause Mini Program functions to fail to work properly.

1.2 Payment Parameter Configuration (skip this section if online payment is not involved)
Mini Program malls and other scenarios involving online payment: after authorizing and binding the Mini Program, enter the Mini Program configuration page, enter the WeChat Pay merchant number, merchant key, and upload the WeChat Pay API certificate (the acquisition methods for each parameter have been explained in the previous chapter);

1.3 Online Update Packaging
After authorizing and binding the Mini Program, click the [One-Click Packaging] button on the "Package Code" page to package the Mini Program;
Tip: Please always pay attention to version updates on this page and update to the latest software version in time to achieve the best experience.

1.4 Submit for Review/Release
Submit for review: Each time you click [One-Click Packaging] to package the Mini Program, a packaging record will be generated on the "WeChat Review" page. Click [Submit for Review] to submit the code package to WeChat for review. The WeChat review cycle is generally 7 working days. Before submitting for review, please carefully read the "WeChat Mini Program Platform Operation Specifications" and "Common Rejection Situations on the WeChat Mini Program Platform"; Review passed: After WeChat review is passed, click the [Publish] button, wait a moment, and you can find the published Mini Program in the mobile WeChat Mini Program search, completing the release process;
Review failed: If WeChat review fails, please pay attention to the failure prompt and log in to the WeChat Mini Program backend in time to handle related issues;
Note: Only 1 Mini Program is allowed to be submitted for review at the same time.

2. Code Download
Code package download is to download the Mini Program code package on the platform, upload the code yourself through WeChat Developer Tools, and complete Mini Program review and Mini Program release operations through the WeChat Public Platform. It is suitable for users who are more familiar with WeChat Mini Programs.
2.1 Configure Mini Program Parameters
Log in to the management backend, click the [Store] menu -> click [Publish Mini Program] -> click [Mini Program Configuration], and configure the Mini Program parameters: Mini Program name, AppID, AppSecret. AppID and AppSecret can be obtained by logging in to the WeChat Mini Program backend — Settings — Development Settings;

Note that after AppSecret is generated, it will not be stored in plain text on the development platform. You need to keep it properly yourself. Once lost, it needs to be regenerated, which may affect the normal use of the published Mini Program.
2.2 Configure Mini Program Server Domains
Log in to the WeChat Mini Program backend, and configure the Mini Program server domains in Settings — Development Settings. The detailed configuration is as follows:
| Server Configuration | Configure Domain |
| request legal domain | https://manage.vxsh.com |
| socket legal domain | wss://manage.vxsh.com |
| uploadFile legal domain | https://manage.vxsh.com |
| downloadFile legal domain | https://manage.vxsh.com https://wx.qlogo.cn https://thirdwx.qlogo.cn https://hktcdn.weijuju.com https://newres.weijuju.com |

2.3 Payment Parameter Configuration (skip this section if online payment is not involved)
Mini Program malls and other scenarios involving online payment: after authorizing and binding the Mini Program, enter the Mini Program configuration page, enter the WeChat Pay merchant number, merchant key, and upload the WeChat Pay API certificate (the acquisition methods for each parameter have been explained in the previous chapter);

2.4 Download Code Package
After configuring Mini Program parameters, click the [One-Click Packaging] button on the "Package Code" page to package and download the Mini Program;

After downloading, decompress the Mini Program code package to a folder.

2.5 Install WeChat Mini Program Developer Tools
Go to the WeChat Mini Program Developer Tools download page (https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html) to download and install WeChat Mini Program Developer Tools.

Note that you should download the corresponding version according to your computer. For 64-bit Windows systems, please download the Windows 64 version; for 32-bit Windows systems, please download the Windows 32 version; for Apple computers, please download the mac version.
2.6 Import Mini Program Code Package and Upload
Open WeChat Mini Program Developer Tools, use the Mini Program administrator's WeChat to scan the QR code to log in, select Mini Program project, and add a Mini Program project.

Select the project directory, find and select the Mini Program folder just decompressed, click OK to add it, and enter the Mini Program AppID and project name.

In WeChat Mini Program Developer Tools, you can preview the Mini Program and upload the Mini Program code to the WeChat Mini Program backend.

When uploading the code package, you need to fill in the version and project remarks. The version number can be filled in according to actual needs; it is recommended to keep it synchronized with the platform version number. The project remarks can describe the modification content.

2.7 Preview and Submit for Review
Log in to the WeChat Mini Program backend. In Development Management, you can see the Mini Program uploaded in the previous step.

Click "Experience Version" below the version number to preview the Mini Program.

After previewing, click Submit for Review to submit the Mini Program to WeChat for review. After waiting for WeChat review to pass, return to this page to release the Mini Program. If the review fails, you need to modify according to WeChat review comments and resubmit for review. Note that only one Mini Program can be under review at the same time.

