# Function introduction
"apifm" In order to realize user online payment/recharge, you generally need to apply for third-party online payment signing services, such as: WeChat payment merchants, Alipay online payment merchants, and other three-party online payments. Then, according to the online payment API interface they provide, after completing the docking, use the provided merchant number + secret key to realize user online payment.
However, to activate the online payment function, there are generally strict conditions, such as a business license (which means that only enterprises and individual industrial and commercial households, individuals cannot enjoy this service), and the need to sign a contract and go through complex application and activation processes.
**So, how can personal Alipay use functions similar to online payment? **
First of all, we do not recommend that you go to the so-called aggregate payment, fourth-party payment, or so-called secondary clearing agency, because the money paid by the user goes directly into their collection account, and then is settled to you through secondary clearing according to the settlement agreement between you and them;
In essence, their operation carries great legal risks! There is a risk that you will lose everything if you run away!
**Full manual implementation:**
To realize the personal online payment/receipt function, it can also be achieved through a fully manual method:
1. Publicize the payment Alipay account number or payment code, and remind users to fill in their registered account number or mobile phone number when transferring money;
2. After the administrator hears Alipay's payment reminder, he checks Alipay's payment records, and manually adds the corresponding amount to the user in the background (adjusting the balance) based on the amount and the account number filled in the transfer notes;
Of course, the first step can also be for the website to automatically generate a payment code with notes, allowing users to directly scan the code to transfer money, so that users do not need to fill in the amount and transfer notes. For this function, Alipay's official JS-SDK provides a specific method for generating payment codes.
To realize the automatic payment of user recharge/payment in a fully manual way, the administrator needs to log in to the backend, search for the transfer user, and then perform the operation of adding currency (adjusting the balance) to the user. This operation is extremely time-consuming, and there is also a probability of error. After all, the amount of Canadian dollars needs to be entered manually.
**What is a semi-automatic? **
The so-called semi-automatic is an efficiency improvement for the above fully automatic mode. It is not the so-called contract-free fully automatic payment on the Internet. It is fundamentally different in terms of operating principles and modes!
The operating principle of semi-automatic payment is as follows:
1. When the user initiates recharge/payment, the system will generate a recharge order, assuming the order number is 1234;
2. The system automatically generates a payment code based on the method in Alipay’s official JS-SDK, and the order number 1234 is automatically filled in in the transfer notes;
3. After the user scans the QR code with Alipay, the system will push a reminder message to the administrator that the user initiates an Alipay transfer. After clicking this message, you can see the amount of the recharge and 2 manual buttons: Approval Passed and Approval Failed
4. After the administrator hears Alipay’s transfer arrival reminder, he checks the order number 1234, finds the reminder record in the third step, clicks “Approval”, and finally completes the funds arrival.
**Summary**
Through the above explanation, semi-automatic payment simplifies the operation of administrators logging in to the backend to add coins to users. It is simplified to: listen to the voice --> click review in two steps, which greatly improves the overall efficiency of manual verification of transfers and confirmation of payment!
# How to activate?
## Enable plugin
1. If you are a free member, it is a pity that you cannot use the plug-in function of apifm for the time being;
2. If you are a professional version member, then log in to the backend, go to the left menu "Factory settings" --> "Plugin management", find the "Semi-automatic Alipay payment" plug-in, and purchase it online to activate it;
3. If you are a value-added member, you don’t need to do anything, you can use all plug-in functions for free;
## Enable module
Left menu "Factory settings" --> "Module management", find the "Online Payment Interface" module, enable the module and refresh the page
## Alipay settings
Set by adding system parameters:
["Detailed explanation of apifm system parameter setting and configuration"](https://www.yuque.com/apifm/doc/kcncad)
Add text type system parameter settings:
>APILAY_USER_ID
>
Fill in the userId of your payment Alipay (can be any Alipay account of an individual or a company), log in to your own Alipay account, you can see this userId information
**userId is not an Alipay account!****Not an Alipay account!****Not an Alipay account! It’s the Alipay user number, purely numerical!****It’s the Alipay user number, purely numerical! Can be specified on Baidu**

> APILAY_USER_TYPE
>
Set your Alipay type:
```plain
Fill in 0 to represent an individual
Fill in 1 to represent the merchant
Fill in 2 to represent the company
```
When a user initiates payment/recharge, he or she obtains the payment QR code through the following interface, presents the QR code to the user, and allows the user to scan the code to transfer:
Get the payment address interface ["api interface document"] (#):
```plain
/{domain}/pay/alipay/semiAutomatic/payurl
```
# FAQ
## Can’t receive the transfer review reminder?
Scan the QR code and follow the QR code on the backend homepage to receive push notifications.