In the previous article "PHP Realizes Personal Alipay Payment Development (2)", we introduced how to download the software version code for payment, and how to choose the PHP language. Third-party payment interface API.
Now we will continue to introduce the basic operation of the code payment software and the API installation process with pictures and texts.
After downloading the software version code payment, log in to your code payment account, and then scan the code through Alipay to log in to your Alipay account. (If you do not log in to Alipay, you cannot monitor your Alipay transactions)
Then open the corresponding interface file and install it. The installation instructions are as follows.
Graphic tutorial: https://codepay.fateqq.com/help/BkyNe9_tl.html
The following is a simple tutorial on how to upload using the API interface example.
1: Upload the entire codepay directory to the root directory of your website (including the codepay directory name).
2: Set codepay_config.php to writable permissions (writable permissions can be canceled after installation, and generally have permissions).
3: Visit install.php, that is: http://your website/codepay/install.php If there are some exceptions, you need to handle them according to the steps. Usually it prompts that codepay_config.php does not have write permission.
4: Enter the code payment ID and communication key. If you don’t have one, you can go to http://codepay.fateqq.com to register or activate.
5: Enter some information about the MYSQL database. The database name is preferably the database used by your current website.
If the database does not exist, it will be created automatically.
If you do not have a MYSQL database, you can install Mysql or read codepay.php and notify.php 2 source codes to easily implement your own business .
6: After successful installation, if the software version: You still need to run the software and create and upload the QR code. You can only use WeChat payment without software
7: Visit index.php, that is: http://your website/codepay/index.php
8: Test recharge 0.01 and pay (if you If the software version does not have a 0.01 QR code or does not have this amount of QR code, a No QR code will be displayed at this time)
9: After payment, it will automatically jump to return.php (Alipay QQ wallet payment needs to ensure The software has been monitored)
Visit http://your website/codepay/user.php and you will see the following information:
The following is the test data. If the amount increases, it means that the recharge business was successfully executed.
Username: admin Current amount: 0.01 vip field: 0
Finally: delete install.php
10: Start realizing your own business. Modify notify.php or simply modify codepay_config.php to configure the relevant settings at the bottom.
By default, this business is implemented as the user admin recharge amount in the codepay_user table. You only need to modify the relevant settings at the bottom of the codepay_config.php configuration to recharge your existing users (you need to remember to switch databases when installing in different databases to implement business)
For example, [Dream Weaver Management System] modify codepay_config .php configuration: (The following parameter data is obtained by entering the mysql database)
define('DB_USERTABLE', 'dede_member'); //充值用户所在数据库表名 define('DB_USERMONEY', 'money'); //充值用户所在表中的金额字段名 define('DB_USERNAME', 'userid'); //充值用户名的字段名
Code payment official website: https://codepay.fateqq.com/home.htm
This article is about the introduction of interface installation and other related content in the development of personal Alipay payment using PHP. Due to the length of the article, this section will not be introduced here. In subsequent articles, we will explain to you the specific cases of personal Alipay online payment through PHP.
The above is the detailed content of PHP implements personal Alipay payment development (3). For more information, please follow other related articles on the PHP Chinese website!