# Imitated original ride code
Business side through access to the original code industry template, in the business side of the Mini Program to quickly realize the public transport online scan code ride function, and open lines, ride records, help centers and other related pages. Copy the original car code industry template including the following interface (before the call need to complete the Mini Program account registration, WeChat payment merchant number application process, and to the city_api@tencent.com Send the application email to access the ability of imitating the original travel code industry template):
API Name | API Description |
---|---|
Native Jump | According to different needs jump different WeChat imitation native page to achieve different functional requirements. |
Raw code | WeChat backstage requests QR code source data from the business side, and WeChat front-end can generate a ride code based on the source data. |
Payment callback | WeChat backstage requests QR code source data from the business side, and WeChat front-end can generate a ride code based on the source data. |
WeChat deduction | The utility model is used for the receiving business party to conduct secret deduction for the user according to the information obtained by the scan code interface. |
User registration/Signing | WeChat background to the owner initiated user registration. |
User Termination | WeChat background to notify the owner of the user to cancel/Termination. |
User Signing Status Query | The owner inquires the user signing status interface. |
Payment of arrears | WeChat background to the owner to notify the user payment success (payment failure without notification). |
Inquiry line | Public Transportation System/Subway line |
Set the line | Setting up public transportation/Subway line |
Query List of Overdue Users | WeChat background will regularly (starting at 6: 00 every day) access to all the users owed the list, and provide the interface query list interface, after which if the user completes the payment of arrears will be deleted when receiving the successful payment notice. |
# Native Jump
According to different needs jump different WeChat imitation native page to achieve different functional requirements.
# 1、 Request parameters
Parameter Name | type | Required | Remarks |
---|---|---|---|
path_type | int | And | Pages to be redirected 0 - New User Page/Welcome Page (Opening Bus Code, including "Successful Train Code") 1 - Bus code page 2 - Routes opened 3 - Personal Center 4 - My ride history. 5 - help 6 - Arrearage records |
Note: the request parameters are in json format.
# 2、 Return parameters
Parameter Name | type | Required | Remarks |
---|---|---|---|
Errcode | int | And | Return code |
errmsg | string | And | Return Information |
business_type | string | And | Type of business |
query_string | string | And | Parameters to use when calling the mock native Mini Program |
expire_at | int | And | Return to query_Expiration of string uinx timestamp |
# 3、 sample code
Request:
https://api.weixin.qq.com/intp/transportcode/getbusinessviewaccess_token=ACCESSTOKEN
Request parameters:
{ " path_type":1}
Returns:
{
"errcode":0,
"errmsg":"ok",
"business_type":"wxCity",
"query_string":"addr=pages%2Froute%2Fmain&business_view_token=a52f6d30814a8d7d5717d004a0c38894",
"expire_at":1576838728
}