Comments (7)
支付相关代码是我贡献的
我这边有个项目 实际使用 werobot 的
支付相关代码也是一致的
那个时候还没有微小店 现在好像有小店 API
不过我没有用到
如果你遇到问题 可以给提 issue 的
from werobot.
看了源码,有几个问题请教:
1、不知道是否微信支付版本差异,现在的接口地址变了,参数也不同了,详见http://pay.weixin.qq.com/wiki/doc/api/index.php
2、是否支持JsApi 场景发起支付
谢谢
from werobot.
1 目前 我的应用还可以用
2 支持 我的应用就是通过jsapi 发起的
from werobot.
谢谢!
如果用JsApi发起支付,WeixinPayClient 大致操作思路能否指点一下?
from werobot.
大致流程代码 我贴下 删减了 可能不能直接运行
首先 网页段发起 创建请求 把创建订单 必要的参数传递给后端
$.post('/pay/create', {
item_id : {{id}}
}).success(function(data){
WeixinJSBridge.invoke('getBrandWCPayRequest', data, function(res){
if(res.err_msg == "get_brand_wcpay_request:ok"){
alert("购买成功");
}
WeixinJSBridge.log(res.err_msg);
});
服务器端生成 js 需要的 数据 对应上端代码中的 data
, pay_params
就是 data
用来创建订单的
pay_params = wxclient.create_js_pay_params(body=商品名称,
out_trade_no=外部订单号, total_fee=价格分,
notify_url=回调地址,
spbill_create_ip=request.environ.get('REMOTE_ADDR'), )
from werobot.
谢谢耐心答复。
因用的微信支付3.3.7接口,目前还没用微信支付组件,使用比较笨办法实现了支付。
from werobot.
能否请问一下怎么获取 wxclient? 谢谢……
from werobot.
Related Issues (20)
- Session问题 HOT 1
- 服务器侧获得用户推送的经纬度 HOT 1
- 监听无效果 -- Ineffectiveness Monitoring HOT 1
- 服务器占cpu用100%
- 重复发送同一条消息导致消息返回失败
- [求助]消息发送失败 HOT 3
- 'NoneType' object has no attribute 'writeHeaders'
- 突然100%故障了: Broken pipe HOT 1
- token验证失败
- 如果我想用ImageReply返回图像,只能返回素材库内部的 图像吗?如果想要返回外部图像 应该怎么做?
- 我使用@robot.text获取用户消息并且执行时,它自动获取了三遍用户消息,并且执行了三遍我的代码逻辑 HOT 6
- 被动回复消息,回复多个图片消息会重复发送同一张图片 HOT 2
- AttributeError: module 'werobot' has no attribute 'WeRoBot' HOT 2
- @myrobot.text回复函数运行超过一段时间会导致连接失败 HOT 1
- 使用PG 做session 存储,报错 psycopg2.errors.UndefinedFunction: operator does not exist: character varying = bytea
- 怎么输入文字返回图片?
- 请问纯python开发的话,在公众号内部实现微信支付的逻辑应该是什么样的呢? HOT 2
- 我的公众号机器人一直回复”再问我一次吧”,无论发什么都是这样回答
- 多个Client会冲突。
- 请问用这个库可以做到让服务器给微信公众号发消息,并显示出来吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from werobot.