WeChat payment error: get_brand_wcpay_request:fail

  I have been developing WeChat payment recently, and when the payment is called up on the last page, I keep reporting this error: get_brand_wcpay_request:fail.

  Since the page is on mobile, it's hard to debug. Later, I thought of a way to build a div element on the page, set its ID to actionResult, and then use the method provided by jQuery to display the call result:
$("#actionResult").text(JSON.stringify(res))

  It's easy to see what went wrong.

  There are three common reasons:
  1. Insufficient number of parameters or wrong names. Check the development documentation, provide enough parameters, the name and case should be correct, and note that the unit of timeStamp is seconds. 
  2. The signature is incorrect. Pay attention to the requirements for reviewing the signature.
  3. The address is not authorized. In "WeChat Payment" -> "Development Configuration", set the authorization directory. The authorization takes a longer time to take effect.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326930697&siteId=291194637