国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home WeChat Applet WeChat Development Detailed explanation of android WeChat payment example code

Detailed explanation of android WeChat payment example code

Mar 27, 2017 pm 01:36 PM
android WeChat Pay

This article mainly introduces in detail android WeChat payment source code, which has certain For practicality and reference value, interested friends can refer to it

This article shares the android WeChat payment source code for your reference. The specific content is as follows

Parameter configuration

public?static?final?String?APP_ID?;
/**
在微信開放平臺注冊app,微信給分配的id
**/
public?static?final?String?MCH_ID;
/**
申請開通微信支付,成功后微信會給你發(fā)一封郵件,給你分配一個商戶平臺賬號,在資料里有商戶ID
**/
public?static?final?String?API_KEY;
/**
在微信發(fā)給你的那封郵件里,給你分配的微信商戶平臺賬號,在里面設(shè)置一個api_key
**/

Get prepay_id

The above configurations are correct. When you run it, you will receive a return result like this on WeChat:

<xml><return_code></return_code>
<return_msg></return_msg>
<appid></appid>
<mch_id></mch_id>
<nonce_str></nonce_str>
<sign></sign><result_code></result_code>
<prepay_id></prepay_id>//成功獲取到預付id
<trade_type></trade_type>
</xml>

When taking the second step, you may have problems:

##result_code>//merchant id Wrongresult_code>//When assembling product parameters, the Chinese content must specify the encoding, otherwise the code will be garbled and this error will be reported;

Successfully obtained prepay_id. At this time, the payment interface cannot be adjusted.

/***Note:

1. If the app you apply to open WeChat payment is registered on the WeChat open platform and uses the
eclipse default signature, then you can activate it for payment in the development environment now. Page2. If the signature in the open platform app uses a custom signature, you need to use the signature to package it, and then run it to adjust its WeChat payment
***/

WeChat payment result callback? Where?

1.app client, we accept the payment callback result in this class

Detailed explanation of android WeChat payment example code##/**

You need to change the coloring part to your own app_id

** /

Detailed explanation of android WeChat payment example codeNote:

/**?
這個activity,是個透明的activity,回調(diào)完,你需要結(jié)束掉它*?
2.服務端?
**/
packageParams.add(new?BasicNameValuePair("notify_url",?"http://121.40.35.3/test"));
/**
需要指定一個回調(diào)接口,用于微信來調(diào)用,通知服務端,修改數(shù)據(jù)
*/

The above is the detailed content of Detailed explanation of android WeChat payment example code. For more information, please follow other related articles on the PHP Chinese website!

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

Undress AI Tool

Undress AI Tool

Undress images for free

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.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

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)

Hot Topics

PHP Tutorial
1502
276
Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Sep 27, 2024 am 06:23 AM

The Redmi Note 14 Pro Plus is now official as a direct successor to last year'sRedmi Note 13 Pro Plus(curr. $375 on Amazon). As expected, the Redmi Note 14 Pro Plus heads up the Redmi Note 14 series alongside theRedmi Note 14and Redmi Note 14 Pro. Li

What is the difference between H5 page production and WeChat applets What is the difference between H5 page production and WeChat applets Apr 05, 2025 pm 11:51 PM

H5 is more flexible and customizable, but requires skilled technology; mini programs are quick to get started and easy to maintain, but are limited by the WeChat framework.

Oppo Find X8 design looks like a cross between Apple iPhone 16 Pro and OnePlus Open in early images Oppo Find X8 design looks like a cross between Apple iPhone 16 Pro and OnePlus Open in early images Sep 28, 2024 am 06:04 AM

Historically, Oppo has refreshed its flagship 'Find X' series in late winter or early spring, save for the original Find X that it announced in June 2018. To that end, the Find X7 and Find X7 Ultra are barely more than six months old at this point. H

Xiaomi Redmi Note 14, Redmi Note 14 Pro and Redmi Note 14 Pro Plus to shake up mid-range smartphone market with Gorilla Glass Victus 2 and IP69 certification Xiaomi Redmi Note 14, Redmi Note 14 Pro and Redmi Note 14 Pro Plus to shake up mid-range smartphone market with Gorilla Glass Victus 2 and IP69 certification Sep 24, 2024 pm 12:15 PM

Xiaomi has just announced the release date for its next Redmi Note smartphones. As expected, these are set to arrive as three Redmi Note 14 series handsets. More specifically, the company intends to release the Redmi Note 14, Redmi Note 14 Pro and Re

Samsung Galaxy Z Fold Special Edition revealed to land in late October as conflicting name emerges Samsung Galaxy Z Fold Special Edition revealed to land in late October as conflicting name emerges Oct 01, 2024 am 06:21 AM

The launch of Samsung's long-awaited 'Special Edition' foldable has taken another twist. In recent weeks, rumours about the so-called Galaxy Z Fold Special Edition went rather quiet. Instead, the focus has shifted to the Galaxy S25 series, including

Lenovo reveals new color option for the 2024 Legion Y700 gaming tablet Lenovo reveals new color option for the 2024 Legion Y700 gaming tablet Sep 29, 2024 am 06:05 AM

Lenovo is gearing up to launch the 2024 Legion Y700 on September 29 in China. This new Android gaming tablet will be going against the RedMagic Nova, and the company has already confirmed almost all the specs of the device. Now, hours before the full

iQOO Z9 Turbo+ debuts as Dimensity 9300+ smartphone with \'off-the-charts\' battery life iQOO Z9 Turbo+ debuts as Dimensity 9300+ smartphone with \'off-the-charts\' battery life Sep 26, 2024 am 06:20 AM

TheZ9 Turbo+has now been unleashed on Vivo's online Chinese store at 2,199 yuan (~$313) for a 12GB RAM/256GB internal storage base model, whereas theRedmiK70 Extreme Editionstarted at 2,599 yuan (~$370) with the same configuration: in fact, its newiQ

Are these C2C transactions in Binance risky? Are these C2C transactions in Binance risky? Apr 30, 2025 pm 06:54 PM

Binance C2C transactions allow users to buy and sell cryptocurrencies directly, and pay attention to the risks of counterparty, payment and price fluctuations. Choosing high-credit users and secure payment methods can reduce risks.

See all articles