# preface
Please read firstBusiness Access Guidelines
# 1. to access
# 1.1 Request access
# Mode 1: MP access
inWeChat Public PlatformLog in the Mini Program, select the custom version of the transaction components, and apply for the opening function, enter the audit process. Businesses can also request access by calling the interface to open the function.
# API interface
# 1.2 Access query
# Method 1: MP View
# API interface
# 2. Upload Product
For some scenes, such as video number live, want to live in the window shelf goods with goods, you must first through the API to upload the goods to the transaction components in the platform
# 2.1 Get a list of categories and check whether the category for the product is required to apply for qualification in advance
callGet the class list interface
# 2.2 Upload Category Qualification
wait forCategory audit callback
# 2.3 Upload brand qualification
wait forBrand Audit Callback
# 2.4 New products
wait forProduct review callback
# 3. Payment checkout
For some scenes, such as video number live, want to live in the window shelf goods with goods, you must first through the API to upload the goods to the transaction components in the platform
For details, please jumpScenario Access Guidelines
# 3.1 Open Payment Checksum for Development Environment
# Mini Program is developing branch process app.json Add the following parameter settings (this parameter is only valid for the development environment, after the code is released the parameter is invalid, that is, the official version of the Mini Program to open the payment checkout is only relevant to 3.2 below)
"usingShopPlugin": true
# 3.2 Determine if there is a need to pay the checkout (Sync legitimate orders to the WeChat side)
The front end of the business first passgetEnterOptionsSyncoronShowGet the Mini Program's current scene valuescene
Through againCheck if the scene value is within the payment checksum rangeThe interface judges the scene
Do you need to pay for verification?
# 3.3 New and Old Payment Verification Instructions
The old solution required synchronizing the order and getting the ticket through the backend api, and finally pulling up through the ticketwx.requestPayment
The new scheme simply calls the order datawx.requestOrderPayment
can then
Validation is based on the scene value, so there are two ways for developers to decide when to start validation:
- Judge the scene situation, if the scene needs to be checked, call the checksum logic, otherwise not checksum, the subsequent scene value expansion, need to carry out real-time follow-up, otherwise it will lead to this scene can not be traded
- Recommended to use the full order upload, do not need to judge according to the scene value, the subsequent scene value iteration, without change.
# The original ticket payment checkout (about to be abandoned): through the synchronous order to the API get the ticket and then adjust the jsapi (new access merchants please use the above recommended way)
callSynchronous Order InterfaceNote that the order checks that the item in the order exists and that its status is on the shelf
After the call is successful, you get a ticket to pay for the checksum, which is in the base libraryrequestPayment
Enter the ticket field to pull up the cashier normally
wx.requestPayment({
timeStamp: '',
nonceStr: '',
package: '',
signType: 'MD5',
paySign: '',
ticket: '', // Need to add ticket information
success (nothing) { },
fail (nothing) { }
})
# New payment checkout: order passed directly to jsapi method
Merchant front end uses new checkout jsapi wx.requestOrderPayment
replacewx.requestPayment
parameterorderInfo
Format PleaseJump to view
wx.requestOrderPayment({
timeStamp: '',
nonceStr: '',
package: '',
signType: 'MD5',
paySign: '',
orderInfo: {...}, // Need to add order information
success (nothing) { },
fail (nothing) { }
})
Note: Because the developer access stage does not open the video number scene, so the order cannot be intercepted, to achieve the debugging purpose, so in the developer tool to provide test scene value 10001, please set this scene, and pull up the cashier. If pull up failure, please checkorder_info
Whether to set, or print interface return for troubleshooting.
# 3.4 Order updates
Note that the orders that have been synchronized and are synchronized by 3.4.1 will be synchronized to the Mini Program Order Center.
# 3.4.1 Order Status Synchronization
callSynchronous Order Payment Result InterfaceSynchronization Payment Success Result
# 3.4.2 Synchronize after-sales information
Development of this need to produce after-sales orders after-sales information circulation, synchronization, if there is no after-sales, then do not need. callSynchronous after-sales interfaceSynchronous after-sales
# 3.5 Publish code to take effect on the online environment
After completing the interface docking and product upload, submit the code to the WeChat team for audit, after the audit can be released, at this time the payment verification officially takes effect