Alipay mini program
This topic describes how to integrate a published mobile application with an Alipay mini program.
The instructions for using Alipay mini programs in this topic are for reference only. For more information, see the Alipay Mini Program Documentation Center.
Prerequisites
You have added a domain name for the mobile application and obtained its release address. For more information, see Publish and use an application.
You have registered an Alipay enterprise account.
Download and install the miniapp developer tool. For more information, see Miniapp Developer Tool.
Limits
The account authentication feature is not supported. For more information, see Application authentication.
An Alipay mini program can be attached to only one mobile application. To attach the mini program to a different mobile application, you must first delete the verification file for the original mobile application and then upload the verification file for the new mobile application.
Step 1: Create a mini program
Log on to the Alipay Developer Platform.
ImportantIf you do not have an account, follow the on-screen instructions to register. You must use an enterprise account to create the mini program because the required features are not available for personal accounts.
Go to the Console page. In the My Applications section, choose Create Application > Mini Program.
On the Create Mini Program page, enter a name for the mini program, such as Test, and click Create. After the mini program is created, the Version Management page is displayed.
Step 2: Configure H5 domain names
In the navigation pane on the left, click Development Settings. On the Development Settings tab, find the H5 Domain Configuration section and click Add.
In the H5 Domain Configuration dialog box, add the domain name of your mobile application.
Click Download Verification File and save the file to your computer.
Place the verification file in the root directory of your configured domain name.
In the mobile application editor, click the Settings icon
in the far-left navigation pane. On the Mini Program Settings tab, upload the verification file.NoteAlipay verification files must have the .html extension.
Click Click here to confirm that the verification file is accessible. After the validation is successful, enter the domain name in the Domain Name field and click OK.
NoteThe domain name is the one you configured in Step 2: Publish the application.
Add the official IoT Studio resource address:
https://g.aliplus.com.In the H5 Domain Configuration section, click Add.
In the H5 Domain Configuration dialog box, enter
https://g.aliplus.comin the Domain Name field and click OK.
Step 3: Configure the mini program
Run the miniapp development tool. In the navigation pane on the left, choose Alipay > Mini Program.
On the Mini Program page, create a project. Enter a Project Name, select a Project Path, and click Finish.
In the upper-left corner, select the Test mini program that you created. Replace the content of the index.axml application file with the following code.
<view> <web-view src=" Release address of the IoT Studio mobile visualization application ?isMiniApp=true" /> </viewPublish and verify the mini program. For more information, see Publish a mini program.