微信文档:
1、开发者文档:https://mp.weixin.qq.com/wiki
2、微信支付开发文档:
http://kf.qq.com/faq/140225MveaUz150107UVFNjy.html
https://pay.weixin.qq.com/wiki/doc/api/index.html
3、微信JS=SDK相关文档与算法
微信支付的WxPay.JsApiPay.php
function GetJsApiParameters 获取jsapi支付的参数,
以下为正确的参数结构:
- {
- "appid": "wx8bxxxxxxxxxxx",
- "mch_id": "1407xxxx",
- "nonce_str": "pRa9v5BPl0gZi2tk",
- "prepay_id": "wx20170117104636d65cd93cc60911219918",
- "result_code": "SUCCESS",
- "return_code": "SUCCESS",
- "return_msg": "OK",
- "sign": "825843F5A82E918B0298BB7EBF572921",
- "trade_type": "JSAPI"
- }
以下为用户重复购买同一个订单号返回的信息:
- {
- "appid": "wx8bxxxxxxxxxxx",
- "err_code": "INVALID_REQUEST",
- "err_code_des": "201 商户订单号重复",
- "mch_id": "1407xxxx",
- "nonce_str": "ruBlTfdBZncy9vU4",
- "result_code": "FAIL",
- "return_code": "SUCCESS",
- "return_msg": "OK",
- "sign": "FD3328F19A380749AC762D5EB5FD97E3"
- }
支付成功后callback返回的参数结构:
返回参数的文档对照:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
- {
- "appid": "wx8bxxxxxxxxxxx",
- "attach": "test",
- "bank_type": "CFT",
- "cash_fee": "1",
- "fee_type": "CNY",
- "is_subscribe": "Y",
- "mch_id": "1407xxxx",
- "nonce_str": "rzjyux5cnsrmdhnd21llpo61gm2uh54z",
- "openid": "oKJPuwxxxxxxxxxxx",
- "out_trade_no": "140786170220170114200045",
- "result_code": "SUCCESS",
- "return_code": "SUCCESS",
- "sign": "8237C5A1B6E85B29B868F3C0A0294A7F",
- "time_end": "20170114200057",
- "total_fee": "1",
- "trade_type": "JSAPI",
- "transaction_id": "4005692001201701146324716577"
- }
transaction_id 微信支付成功后的订单号,如果没有这个单号,那会在callback中要判断支付失败
第二步,根据微信支付订单号去查询此订单号的真实性
第三步,如果订单号为真,继续写本站的接下来的处理业务
提取微信文章中的视频地址:
在这里链接里找到vid=o00159at1lv,这就是该视频的vid字符串。复制字符串,粘贴到下面这个通用链接里,就是该视频的原地址了。这个地址可以在电脑上直接打开。
http://v.qq.com/boke/page/d/0/v/字符串.html
视频原链接:
http://v.qq.com/boke/page/d/0/v/o00159at1lv.html
提取微信文章中的图片,一般来说就直接下载就好,谷歌的试过了没用,用360打开文章链接,右击另存为,webp,没关系,不理它,下载完成以后就变成了jpg或gif了
公众号支付申请退款接口
第一步,需要下载证书,登录微信支付 商户平台:
https://pay.weixin.qq.com/index.php/core/home/login