Home Backend Development PHP Tutorial WeChat payment service provider model (acceptance agency model) development considerations, jsapi payment

WeChat payment service provider model (acceptance agency model) development considerations, jsapi payment

Jul 28, 2016 am 08:27 AM
demo openid sub

1. The demo you download first usually has some bugs, so you need to change it first.

2. It seems that WeChat has not developed a separate demo for the service provider model, and the downloaded ones are all payment demos for ordinary merchants. In fact, there is no need to write them separately here, because the difference between them is just a few parameters.

(0) All parameters set in the demo must be filled in with those of the service provider, not the sub-merchant.

(1) The first difference is openid. The openid is passed directly in the demo. In the service provider mode, sub_openid needs to be passed. The method of obtaining it is not explained. In short, what is needed to obtain it is the appid and appsecret of the sub-merchant, that is, the special merchant.

(2) You need to pass one more sub_mch_id parameter on the incoming page.

(3) Comment out the code that determines openid in the calling class, otherwise you will never be able to proceed to the next step.

(4) Set up the authorization directory in the WeChat payment merchant backend of the service provider, instead of setting it up in the public platform backend like ordinary merchants.

The demo has been updated. Those who still don’t understand it can download it and have a look.

If there are no other special requirements, you can use it directly if the parameters are filled in correctly.

Address:

The above has introduced the development considerations for the WeChat payment service provider model (acceptance agency model), jsapi payment, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

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

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months 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)

What does demo mean? What does demo mean? Feb 12, 2024 pm 09:12 PM

The word demo is no longer unfamiliar to friends who like to sing, but many users who have never been exposed to it are curious about what demo means. Now let’s take a look at the meaning of the demo brought by the editor. What does demo mean? Answer: Demo tape. 1. The pronunciation of demo is ['deməʊ] in English and ['demoʊ] in America. 2. Demo is the abbreviation of "demonstration", which generally refers to the preliminary effect of listening to a song before it is officially recorded. 3. Demo is used as a noun to refer to sample tapes and sample records. The meaning of verb is trial (especially software), demonstration and demonstration;

How to use demo of python random library How to use demo of python random library May 05, 2023 pm 08:13 PM

Simple use of pythonrandom library demo When we need to generate random numbers or randomly select elements from a sequence, we can use Python's built-in random library. The following is an annotated example that demonstrates how to use the random library: #Import random library importrandom #Generate a random decimal between 0 and 1 random_float=random.random()print(random_float)#Generate a random decimal within the specified range Random integer (including endpoints) random_int=random.randint(1,10)print(random_int)#

FCC filing for Sonos Sub Mini confirms cylindrical design, could launch in summer FCC filing for Sonos Sub Mini confirms cylindrical design, could launch in summer Apr 18, 2023 pm 10:07 PM

Sonos just launched its most affordable soundbar yet, the Ray. The product launched as the company's next product will be a good companion to the compact Ray and Beam soundbars. Last month, we got a detailed look at the Sonos SubMini thanks to renders created by TheVerge after seeing leaked images of the product. Now, Sonos FCC documents (via The Verge) reveal the underside of the Sonos Sub Mini and confirm that the expected design is accurate. The FCC image also points to a black and white variant, which is intended to match the options on the Ray and Beam soundbars (as well as other Sonos products)

Realme's 300W fast-charging demo sees battery juiced up from 0 to 17% in only 35 seconds Realme's 300W fast-charging demo sees battery juiced up from 0 to 17% in only 35 seconds Aug 10, 2024 pm 10:14 PM

Realme turned heads recently when it announced 300W fast-charging for its supposedGT7 Pro(as detailed in previous leaks). It's not the first brand to make such an announcement, though - Xiaomi has also been teasing its 300W charging for a while now.

Secure PHP authentication with OpenID Connect Secure PHP authentication with OpenID Connect Jul 25, 2023 am 10:13 AM

PHP security verification through OpenIDConnect In today's Internet era, protecting users' data security and privacy has become a crucial task. In order to improve website security, developers often use authentication to protect users' sensitive information. OpenIDConnect is an identity authentication framework based on the OAuth2.0 protocol and is widely used in various network applications. This article will introduce how to use OpenIDConnect to implement

SpringBoot basic web development demo method SpringBoot basic web development demo method Jun 02, 2023 am 10:22 AM

1. Import Lombok's dependency org.projectlomboklombok1.18.62 in pom.xml in the created springboot project. Install the Lombok plug-in 3. Create a package of the entity class at the same level as the main startup class, create the entity class in the package, and Use Lombokpackagecom.hxy.bean;importcom.fasterxml.jackson.annotation.JsonFormat;importlombok.AllArgsConstructor;importlombok.Data;importlom on entity classes

How to use OpenID functions for cross-domain authentication and authorization in PHP? How to use OpenID functions for cross-domain authentication and authorization in PHP? Jul 24, 2023 pm 09:01 PM

How to use OpenID functions for cross-domain authentication and authorization in PHP? Introduction: With the development of the Internet, user privacy and data security have become an important issue. Open Identity Authentication (OpenID), as an open and secure standard, is widely used on various websites and can achieve cross-domain authentication and authorization. This article will introduce how to use OpenID functions in PHP for cross-domain authentication and authorization, and provide relevant code examples. 1. What is OpenID? OpenID

How to use redis to create a flash sale support demo How to use redis to create a flash sale support demo May 27, 2023 am 08:22 AM

Use redis to deduct inventory for flash sales, limiting each account to only one snap-up. This simple demo uses three basic types: string, hash, and list. Use int values ​​of string type to store the remaining inventory, and reduce it after the snap-up is successful. 1. Use hash to store the ID of the member who has been "sold out" (to ensure the uniqueness of the user ID as a field). Note: The uid corresponding to the hash field may not necessarily be a successful snap up. Use a list to save the ID of a member who has actually been snapped up successfully. When I first wrote the list as a queue for subsequent processing of orders, I tried to use the bitmap of string to save whether the member had successfully purchased, but

See all articles