Table of Contents
回复内容:
Home Backend Development PHP Tutorial 微信公众账号中的一键绑定该怎么设计

微信公众账号中的一键绑定该怎么设计

Jun 06, 2016 pm 08:45 PM
php WeChat Micro-channel public platform

招商银行的一卡通绑定是通过给公众平台发送一条消息,然后获取用户Openid,根据Openid获取用户信息,然后绑定用户账号(详见微信公众账号“招商银行”),微信给出的例子也是这个,但是我发现有些公众账号点击“绑定账号”之后是直接跳到到一个wap站的,详细可参考“ 北京交警”业务办理->我的违法,这是怎么做到的呢?

回复内容:

招商银行的一卡通绑定是通过给公众平台发送一条消息,然后获取用户Openid,根据Openid获取用户信息,然后绑定用户账号(详见微信公众账号“招商银行”),微信给出的例子也是这个,但是我发现有些公众账号点击“绑定账号”之后是直接跳到到一个wap站的,详细可参考“ 北京交警”业务办理->我的违法,这是怎么做到的呢?

微信公众平台的所谓“openid”分为两种:

  • [第一种openid]为利用交互的xml中获取:
    <fromusername></fromusername>
    每个用户针对每个微信公众平台唯一,即同一个用户对不同微信公众平台[第一种openid]是不同的;
    个人倾向称之为fakeid,获取不需要授权页面。
  • [第二种openid]为利用微信提供的OAuth2.0接口(高级接口需要为认证的服务号)
    每个用户唯一,也就是说同一个用户对不同微信公众平台的[第二种openid]都是一样的;
    个人倾向称之为真正的openid,获取需要授权页面。

第一种公众平台开发者文档没有明说,但只要看过文档不难推断;
第二种所用接口详见:公众平台开发者文档-网页授权获取用户基本信息。

其实这个问题可以理解为,在微信里用户标识openid的处理。

获取用户openid有两种方式。
微信平台规定,当用户与服务号产生交互时,开发者可以获取到用户的openid。实际上是提倡用户与服务号交互。招商银行的属于这一种。

对于跳转到wap站的形式,是直接进去到一个企业手机网站,也就是目前流行的微网站。在网站中如何标识网站,接得通过手机网站用户系统绑定openid的形式了。涉及到oauth认证。

招商银行微信 跟TX有官方合作 是作为推广案例 使用内部接口 譬如可以任何时间给用户主动推送消息.
跳转到wap站 是把你的用户信息跟openid进行关联之后 你向该公众账号发送 获取openid ---> 数据库查询该用户的其他信息

微信公众平台有开发接口 微信公众平台OAuth

招商银行信用卡的微信公众平台的打造者是云软IMCC,因为我公司还获得招商银行“2013年度最佳供应商”称号,详情进关注我们的官网:http://www.icloudsoft.com.cn/index.html

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

deepseek image generation tutorial deepseek image generation tutorial Feb 19, 2025 pm 04:15 PM

DeepSeek: A powerful AI image generation tool! DeepSeek itself is not an image generation tool, but its powerful core technology provides underlying support for many AI painting tools. Want to know how to use DeepSeek to generate images indirectly? Please continue reading! Generate images with DeepSeek-based AI tools: The following steps will guide you to use these tools: Launch the AI ​​Painting Tool: Search and open a DeepSeek-based AI Painting Tool (for example, search "Simple AI"). Select the drawing mode: select "AI Drawing" or similar function, and select the image type according to your needs, such as "Anime Avatar", "Landscape"

gateio Chinese official website gate.io trading platform website gateio Chinese official website gate.io trading platform website Feb 21, 2025 pm 03:06 PM

Gate.io, a leading cryptocurrency trading platform founded in 2013, provides Chinese users with a complete official Chinese website. The website provides a wide range of services, including spot trading, futures trading and lending, and provides special features such as Chinese interface, rich resources and community support.

Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Mar 04, 2025 pm 04:51 PM

Gate.io (Sesame Open Door) is the world's leading cryptocurrency trading platform. This article provides a complete tutorial on spot trading of Gate.io. The tutorial covers steps such as account registration and login, KYC certification, fiat currency and digital currency recharge, trading pair selection, limit/market transaction orders, and orders and transaction records viewing, helping you quickly get started on the Gate.io platform for cryptocurrency trading. Whether a beginner or a veteran, you can benefit from this tutorial and easily master the Gate.io trading skills.

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Ouyi Exchange app domestic download tutorial Ouyi Exchange app domestic download tutorial Mar 21, 2025 pm 05:42 PM

This article provides a detailed guide to safe download of Ouyi OKX App in China. Due to restrictions on domestic app stores, users are advised to download the App through the official website of Ouyi OKX, or use the QR code provided by the official website to scan and download. During the download process, be sure to verify the official website address, check the application permissions, perform a security scan after installation, and enable two-factor verification. During use, please abide by local laws and regulations, use a safe network environment, protect account security, be vigilant against fraud, and invest rationally. This article is for reference only and does not constitute investment advice. Digital asset transactions are at your own risk.

gateio exchange app old version gateio exchange app old version download channel gateio exchange app old version gateio exchange app old version download channel Mar 04, 2025 pm 11:36 PM

Gateio Exchange app download channels for old versions, covering official, third-party application markets, forum communities and other channels. It also provides download precautions to help you easily obtain old versions and solve the problems of discomfort in using new versions or device compatibility.

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

List of handling fees for okx trading platform List of handling fees for okx trading platform Feb 15, 2025 pm 03:09 PM

The OKX trading platform offers a variety of rates, including transaction fees, withdrawal fees and financing fees. For spot transactions, transaction fees vary according to transaction volume and VIP level, and adopt the "market maker model", that is, the market charges a lower handling fee for each transaction. In addition, OKX also offers a variety of futures contracts, including currency standard contracts, USDT contracts and delivery contracts, and the fee structure of each contract is also different.

See all articles