Home Backend Development PHP Tutorial Tutorial on integrating Alipay into your WordPress_PHP tutorial

Tutorial on integrating Alipay into your WordPress_PHP tutorial

Jul 13, 2016 pm 05:42 PM
wordpress and for Why What Write precious pay Tutorial article yes of Table of contents system integration integrated

Table of Contents
1. What is the system integration between WP and Alipay?
2. Why write this article?
3. Steps of system integration
4. Some thoughts
Text
1. What is the system integration between WP and Alipay?
Alipay is currently the most popular electronic payment platform in China. In China, as long as you do online sales, you will inevitably have to deal with Alipay. Especially since the application fee for Alipay's merchant services has been waived (but a profit share of 1+% is required), Alipay has increasingly become one of the important payment methods for online marketing.
WordPress is an open source blogging program (but now, we have almost turned it into a CMS content management system). It has innate search engine friendliness and is the favorite of SEOers. In particular, due to its open source and simplicity, WP enthusiasts around the world have developed thousands of function extensions (plugins) and tens of thousands of template applications (theme) and widgets (widgets). These are the reasons why wp has strong vitality.
Based on the above reasons, currently, more SEO people hope to combine the SEO friendliness and rich function expansion of WP with the versatility of Alipay. Through the integration of WP and Alipay, online sales with higher conversion rates can be achieved.
2. Why write this article?
Not long ago, I used wp-mu to build a new multi-user website building system. Although the target group is a large number of users who like "free", for the sake of profitability, it is still hoped that some advanced functions can only be used through user payment. So, I thought of embedding the Alipay payment channel in the wp system. Before, I have seen that some domestic BSPs (there seem to be only a few) have adopted the integration of Alipay and WP, ​​but I don’t know how they implement it. After searching, I saw people with the same needs as me. In addition, there are some experts who often say that the structure of the entire site must be modified to achieve integration. After a few days, there was no result. So, I decided to try it myself. The result is, quite simply, a success.
3. Steps of system integration
Due to time constraints, these steps will not be taken in screenshots. Because everyone is either engaged in SEO or development, I wrote it in words, so everyone can understand what I am talking about. Start now.
The main steps for integrating wp with Alipay system:
a. Apply for Alipay merchant service
b. Obtain system integration API
c. Interface installation and code modification
Specifically:
(1) Register an Alipay account. Here: https://www.alipay.com/
(2) After logging in, go to the Alipay homepage "Merchant Services" - "Instant Deposit (What I Need)"
(3) Fill in the merchant service center application form and conduct real-name authentication of the "contracted merchant". You are required to provide real personal information and mobile phone number in order to receive the verification code
(4) Submit the information and wait about 24 hours
(5) Receive the confirmation email from the contracted merchant and download the code samples required for system integration. If you don’t understand code, log in to “Merchant Services” on Alipay’s official website, click “Apply for Integration” in the contract list, and ask Alipay’s technical support staff to help you integrate
(6) Alipay’s technical support staff will call you within 48 hours after you apply for integration. You tell her that you are a WordPress system, tell her that you are the administrator of the website, and ask her to help you set up the WP-based interface program. About 2 hours later, an interface program based on the WP environment will be sent to your email.
(7) The following operations are all based on the PHP host. Win should be similar, but no one uses IIS to configure wp, right?
(8) Send Alipay to your interface program (rar compressed package), decompress it, and then compress it into zip. As for why, because mine is a GD host, I can only use zip. At this time, your interface program has been compressed into alipay.zip
(9) Create a new folder /alipay in your server and upload the alipay.zip compressed package to this directory. Decompress on the server side
(10) After decompression is completed, the path to access the Alipay interface program is: yourdomain.com/alipay/index.php
(11) At this point, more than half of the system achievements of wp and alipay have been completed. The payment channel at this time is ready for use! You can try to make a payment as a user and go to your Alipay account to check whether the payment amount has been credited.
(12) Some modifications: Alipay’s default interface page may not match the overall style of our website. At this time we may need to make some modifications to the page. Such as:
l Modify the name of the payment page at ;
l Modify the label of the form in ;
l Modify the text block in the right column of the payment page in
l Modify the content of the footer position at , but the link information of alipay should be retained;
Some other basic settings:
l Open the alipay_config.php file
l Modify the jump page after completing payment at $return_url=. You may need to manually create a page similar to complete-payment.html in the root directory to let the user know what he should do after handing the money to you;
l Set whether to enable the anti-phishing function at $antiphishing=. Alipay recommends that you contact the official before opening it. Once it is opened, it cannot be closed;
l In the $mainname= “Payee Name”; line of code, replace the payee name with the name of your website.
4. Some thoughts
(1) What is applicable is the best;
(2) Try to solve the problem yourself, and many problems will be solved easily;
(3) Technology is not a supernatural event, everything is rational, and the average person’s intelligence is enough to understand the inside story of most technologies;
(4) Except for some xhtml, no complex code modifications are used;
(5) Complete.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486066.htmlTechArticleContents 1. What is the system integration between WP and Alipay? 2. Why write this article? 3. Steps of system integration 4. Some thoughts Text 1. What is the system integration between WP and Alipay? Pay...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to adjust the wordpress article list How to adjust the wordpress article list Apr 20, 2025 am 10:48 AM

There are four ways to adjust the WordPress article list: use theme options, use plugins (such as Post Types Order, WP Post List, Boxy Stuff), use code (add settings in the functions.php file), or modify the WordPress database directly.

Why is the rise or fall of virtual currency prices? Why is the rise or fall of virtual currency prices? Why is the rise or fall of virtual currency prices? Why is the rise or fall of virtual currency prices? Apr 21, 2025 am 08:57 AM

Factors of rising virtual currency prices include: 1. Increased market demand, 2. Decreased supply, 3. Stimulated positive news, 4. Optimistic market sentiment, 5. Macroeconomic environment; Decline factors include: 1. Decreased market demand, 2. Increased supply, 3. Strike of negative news, 4. Pessimistic market sentiment, 5. Macroeconomic environment.

What are the plugins for wordpress blocking ip What are the plugins for wordpress blocking ip Apr 20, 2025 am 08:27 AM

WordPress IP blocking plugin selection is crucial. The following types can be considered: based on .htaccess: efficient, but complex operation; database operation: flexible, but low efficiency; firewall: high security performance, but complex configuration; self-written: highest control, but requires more technical level.

How to write a header of a wordpress How to write a header of a wordpress Apr 20, 2025 pm 12:09 PM

The steps to create a custom header in WordPress are as follows: Edit the theme file "header.php". Add your website name and description. Create a navigation menu. Add a search bar. Save changes and view your custom header.

How to cancel the editing date of wordpress How to cancel the editing date of wordpress Apr 20, 2025 am 10:54 AM

WordPress editing dates can be canceled in three ways: 1. Install the Enable Post Date Disable plug-in; 2. Add code in the functions.php file; 3. Manually edit the post_modified column in the wp_posts table.

WordPress website account login WordPress website account login Apr 20, 2025 am 09:06 AM

To log in to a WordPress website account: Visit the login page: Enter the website URL plus "/wp-login.php". Enter your username and password. Click "Login". Verification Two-step Verification (optional). After successfully logging in, you will see the website dashboard.

How to change the head image of the wordpress theme How to change the head image of the wordpress theme Apr 20, 2025 am 10:00 AM

A step-by-step guide to replacing a header image of WordPress: Log in to the WordPress dashboard and navigate to Appearance >Theme. Select the topic you want to edit and click Customize. Open the Theme Options panel and look for the Site Header or Header Image options. Click the Select Image button and upload a new head image. Crop the image and click Save and Crop. Click the Save and Publish button to update the changes.

What to do if there is an error in wordpress What to do if there is an error in wordpress Apr 20, 2025 am 11:57 AM

WordPress Error Resolution Guide: 500 Internal Server Error: Disable the plug-in or check the server error log. 404 Page not found: Check permalink and make sure the page link is correct. White Screen of Death: Increase the server PHP memory limit. Database connection error: Check the database server status and WordPress configuration. Other tips: enable debug mode, check error logs, and seek support. Prevent errors: regularly update WordPress, install only necessary plugins, regularly back up your website, and optimize website performance.

See all articles