# Access Guidelines
The custom version of the component needs to go through the 8 steps shown above, in each step to complete the corresponding action:
# Please ensure that every step has been completed, especially the upload of the full amount of goods, otherwise it will affect the normal operation of the Mini Program
# 1. Request access
Register the mini program on WeChat Official Platform, fill in the information and submit the relevant materials according to the guidelines, complete the registration process, if you have a mini program, you can use it directly. Go toRegister Mini Program。
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.
After the application is approved, the Mini Program developer needs to invoke the custom version of the component interface, which contains:
- a. Product-related interfaces: add goods, modify goods, goods on the shelves, goods off the shelf, goods update, etc.
- b. Order-related interfaces: generating orders and tickets, order status synchronization, order acquisition, etc.
- c. Aptitude related interface: brand aptitude upload, category qualification upload, product qualification upload etc.
- d. Logistics and after-sales interface: logistics information synchronization, after-sales single generation, after-sales situation synchronization, etc.
- and. Event callback interface: for receiving product audit, category audit, brand audit results synchronization, etc.
# 2. Upload Products, Apply Category/Brand qualification
Call firstAdd commodity interfaceThe full amount of goods will be uploaded, the status of each product will be notified to the merchant side. (Be sure to access the goodsAudit callback interface)
It is important to note that commodities need to apply for category or brand qualification in advance, please seeAdd commodity interfaceDetailed explaination of
# 3.Synchronization of orders, debugging payment checksum
# 3-1. Sync orders
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 will get a ticket to pay the checksum, and use it in 3-2
# 3-2. Payment checkout
# 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 whether to open payment checksum is only relevant to the MP flag position)
"usingShopPlugin": true
# At the same time, developers also need to pull up the Mini Program WeChat payment checkout interface to do some adjustments, you need to input 3-1 to get the ticket field information to the incoming ticket to the normal adjustment checkout
wx.requestPayment({
timeStamp: '',
nonceStr: '',
package: '',
signType: 'MD5',
paySign: '',
ticket: '', // Need to add ticket information
success (nothing) { },
fail (nothing) { }
})
# 3-3. Order status synchronization
callSynchronous Order Payment Result InterfaceSynchronization Payment Success Result
# 3-4. Synchronizing 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
# 4. In MP/Use the transaction component on the API side (turn on the checkout flag for payment)
Note that at least one item in 3-1 is uploaded and audited successfully, and at least 1 order in 3-2 and 3-3 is a priori condition to open the payment check mark.
In MP/The API side uses the transaction component (turn on the checkout flag for payment), which can be done in one of the following ways
MP side: to enter the WeChat Official Platform(mp.weixin.qq.com)In the menu on the left>Trading component>Custom version of the transaction components click on the "use transaction components" on, complete the complete custom version transaction components access.
API side: referenceAccess Request/Change APIto importaction_type=1
Achieve the effect of using the transaction component.
# 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
# Exit Custom Trading Component Logic
# Exit process and logic
# In MP/Cancel trading components on the API side (Turn off the check mark for payment)
After successfully releasing the Mini Program, in MP/API side to eliminate the use of transaction components (pay check flag)
MP side: to enter the WeChat Official Platform(mp.weixin.qq.com)In the menu on the left>Trading component>Custom version of the transaction components click on the "Cancel use of transaction components" on, complete the complete custom version transaction components exit.
API side: referenceAccess Request/Change APIto importaction_type=2
To cancel the use of transaction components for the effect.
# Mini Program in branch process Remove a page json
"usingShopPlugin": true