微信支付app支付3 0介面開發

2021-07-06 07:02:33 字數 950 閱讀 1058

123

4567

步驟5:商戶後台接收支付通知。api參見【支付結果通知api】

步驟6:商戶後台查詢支付結果。,api參見【查詢訂單api】

服務端要做的,就是步驟1235,客戶端做步驟4就行了,步驟6看自己的需求,我們沒有做.

首先,生成商戶伺服器訂單,這個自不必說,只有生成訂單,才有訂單號,才能做後面的工作.

我們重點看下步驟2和步驟3

123

4567

891011

return_code>

return_msg>

mch_id>

nonce_str>

sign>

result_code>

prepay_id>

trade_type>

xml>

1

,"noncestr":"oxh4g98rfgbmugwbmxfg72ay6qpvieos"

,"package":"sign=wxpay"

,"partnerid":"1277670101"

,"prepayid":"wx2015102014523449175fc2fd0939076028"

,"timestamp":"1445323951"

,"sign":"7f84997fdw40f6f15dd1c28a9e313122"

}noncestr是重新生成的,package是固定寫法,裡面的內容必須寫"sign=wxpay",timestamp也是重新生成的,sign是重新簽名後的結果.

然後把資料返回給客戶端就行了,客戶端調起支付.

打完收工.

php開發微信APP支付介面

request data array mch id c wx mchid 商戶號 nonce str org util string randstring 30 隨機字串 不長於32位 body 商品名稱 商品名稱 out trade no 12345678912456 商戶後台訂單號 total ...

微信app支付

商戶id public static final string partner id 14698sdfs402dsfdew402 常量固定值 public static final string grant type client credential 獲取預支付id的介面url public st...

微信app支付

文件 arr mchid mchid,nonce str str random 32 隨機數 partner trade no order id,自己定義乙個不重複訂單號 check name no check desc desc,spbill create ip request getclient...