微信支付 get_brand_wcpay_request fail,Undefined variable: openid

This article will provide you describe micro-channel pay H5, micro-channel payment solutions JSAPI return paid signature verification fails

Micro-channel pay JSAPI Times this error

View error details

alert(JSON.stringify(res))

 

Micro-channel merchant platform settings: 

Scene Description

Merchant has H5 mall site, the user via a message or two-dimensional code scanning when you open the page in a micro-channel, micro-channel can be called to complete the payment process purchase orders. (User opens business page buy goods, initiates a payment, call getBrandWCPayRequest page JavaScript interface to initiate micro-channel payment request by the user into the payment process)

Step (1): graphic messages sent under business or to attract users to click into business page through a custom menu.

Step (2): enter the business page, users choose to buy, to complete the purchase process.

Step (3): invoking control micro-channel payment, the payment user begins typing password.

Step (4): by password authentication, payment success. Merchant gets paid back notification of success.

When an exception occurs in step 3, without success evoke micro-channel payment controls, print js error, display get_brand_wcpay_request fail

Payment authorization directory to find the configuration in the development of micro-channel merchant platform inside the click Add

The current  address of the requested url , asynchronous request address , the address of a current request  are added to the directory micro-channel merchant payment authorization platform, can solve the problem!

as the picture shows:

If that does not work,

1) the use of micro-channel online tool to check the signature and whether the signature is consistent generated program

HTTPS: // the Pay. weixin.qq.co m / Wiki / DOC / API / micropay.php Chapter = 20_1 signature tool to open with Google?.

Select MD5, XML, and then go into the xml request parameters, you can verify the signature.

2) If the signature tool and online micro letter of agreement that the program is no error, determine API key is wrong (or someone else been altered remember correctly)

Change API key (Account Settings - Security Settings -API security) in the merchant account information platform, to take effect after 15 minutes

2.1) using a single unified business number A, A merchant must also be landed on the merchant platform set key fishes.

2.2) the request to be noted that a single unified type parameter total_fee parameter is of type int.

3) If the signature tool and online micro-channel inconsistencies, indicating that the program contains errors, common error might be:

3.1) coding problem, make sure that all are utf-8 If there is Chinese, you can re-sign the first Chinese into English, to see if a signature error, if the Chinese can not be wrong English only wrong, certainly basic coding problems

3.2 :) message field case and document exactly

4 and unified under a single type of signature tune from the payment needs to be consistent.

Guess you like

Origin www.cnblogs.com/sirdong/p/11780346.html