In the previous article "PHP implements personal Alipay payment development (3)", we gave you a brief introduction to on-code payment Download code payment software on the platform and its basic operations, as well as installation introduction to API interface files.
# Let’s introduce the actual installation and use process of API interface files through a small case.
For example, here I wrote a simple front-end wh page using the TP5.1 framework, as shown in the figure below. After we fill in the information on the left and click Save, the payment window will pop up.
If you want to achieve successful personal payment, you need to install the API interface on the website.
As shown below, copy or paste the codepay file directly into the public folder of my TP project. (public is the entry file)
codepay file download can refer to the article: "PHP implements personal Alipay payment development (2)"
Then in the browser, enter your domain name/codepay/install.php to install.
The installation interface is as follows:
The ID and secret key here can be set in the system of the code payment background turn up. As follows.
After filling in the information, click Install. The installation is successful as shown in the picture below.
Finally, we refresh the homepage, fill in the information, and click Pay. The QR code for Alipay payment will appear successfully. Just scan the code to pay.
Due to the limited length of the article, this article only introduces the installation and use process of the Alipay interface. In subsequent articles, we will continue to combine the source code of this case to provide Everyone explains the relevant knowledge points about implementing personal Alipay payment development in PHP.
The above is the detailed content of PHP implements personal Alipay payment development (4). For more information, please follow other related articles on the PHP Chinese website!