Multiple subscription numbers are common to the same site. How do I differentiate when I order?

Source: Internet
Author: User
Tags openid
my idea is to get a unique identifier for the current subscription number when the user orders in one of the subscription numbers. When the order is generated, an identity is inserted into the database.

Now there is a requirement, that is, multiple subscription numbers are common to one site, but make a difference when you order.
So, I hope you pass by friends to see, to publish a personal view, thank you

Reply content:

My idea is to get a unique identifier for the current subscription number when the user orders in one of the subscription numbers. When the order is generated, an identity is inserted into the database.

Now there is a requirement, that is, multiple subscription numbers are common to one site, but make a difference when you order.
So, I hope you pass by friends to see, to publish a personal view, thank you

It does not seem to get the unique identity of the subscription number, only through dynamic routing to distinguish the user in which subscription number operation, and then insert the database to distinguish between identity

Each subscription number has a unique ID, and the user of each subscription number also has a unique OpenID.
If your site does not require additional registration, or use other authentication methods (mobile phone number or mailbox) to differentiate users, then you can use the ID of the subscription number to do the grouping, OpenID user distinguish.
If you use a mobile phone number, etc. to differentiate users, then the subscription number ID also carry on the line.

Your idea is very good ah, it is generally to increase the number of a field to do the identification. can also be different subscription number of different order number segments, such as a subscription number of orders is 1000001~1999999,b is 2000001~2999999 this way.

You must first through the OAuth2.0 to complete the page authorization to obtain the user's OpenID to identify the user, but to get OpenID, you have to have the public number of AppID and Appsecret, since know these two, it will be sure to know which subscription number.
If your site orders do not need to know who the user is, then you will be in the subscription number to enter the site, the URL with an ID to distinguish which is the number of the subscription is good.

  • 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.