Multiple subscription numbers share the same website. How to differentiate when placing an order?

Source: Internet
Author: User
Tags openid
My idea is to obtain the unique ID of the current subscription number when a user places an order in one of the subscription numbers. Insert an identifier to the database when an order is generated. There is a requirement that multiple subscription numbers share one website. However, when placing an order, make a difference. So, I hope you will pass... My idea is to obtain the unique ID of the current subscription number when a user places an order in one of the subscription numbers. Insert an identifier to the database when an order is generated.

There is a requirement that multiple subscription numbers share one website. However, when placing an order, make a difference.
So, I hope you will take a look and express your personal opinions. thank you.

Reply content:

My idea is to obtain the unique ID of the current subscription number when a user places an order in one of the subscription numbers. Insert an identifier to the database when an order is generated.

There is a requirement that multiple subscription numbers share one website. However, when placing an order, make a difference.
So, I hope you will take a look and express your personal opinions. thank you.

It seems that the unique ID of the subscription number cannot be obtained. you can only use dynamic routing to identify which subscription number the user is operating on, and then differentiate the ID when inserting the database.

Each subscription number has a unique id, and each subscription number user has a unique openid.
If you do not need to register your website or use other authentication methods (mobile phone number or email address) to distinguish users, you can use the subscription id as the group and openid as the user identification.
If you use a mobile phone number to distinguish users, you can simply include the subscription id.

You have a good idea. Generally, you need to add a field for identification. You can also use different subscription numbers for different order numbers. for example, the order number for subscription A is 1000001 ~ 1999999, B is 2000001 ~ 2999999.

You must first use OAuth2.0 to complete web page authorization to obtain the user's openid to identify the user, but to obtain the openid, you must use the public account appid and AppSecret, then you will be able to know which subscription number it belongs.
If you do not need to know who the user is when placing an order on your website, you just need to add an id to the end of the website to identify the subscription number when the subscription number is redirected to the website.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.