No public payment process

 

 

First, the preparatory work

  Micro-channel payment platform, the merchant number: mch_id

  Public platform, the public number: appid

  Development generally requires local mapping extranet

  Recommended ngrok, find a free personal online:

http://www.imawen.com/content.html?id=26

  Public number is set to grab three important parameters

Merchant payment platform set callback URL, note the path forward may, as wx / pay is the full path, wrote wx / it

Second, get code

  Authorization page

 

  

 The acquisition code Code

2, get openid, after the jump to get your website path

Exchange openid

Third, under the single payment signature

 

 Front-end payment page

<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>

 

carry out. Summary of Issues prone: 1 Tip total_fee not found, prepay_id incorrect, unified under a single failure, 2 signature is incorrect, not engage in, carefully check, obtain signatures to put it differently, 3 current page url is not registered. merchant payment platform callback URL is incorrect

Personal experience, with time to step through the pit to prepare for the next use. qq: 741402596

Guess you like

Origin www.cnblogs.com/rayc/p/11294273.html