Notify/Return runs ok,here's some comments
Closed this issue · 10 comments
1.for initAlipayConfig,(partner,key,seller_email,host,transport,cacert,input_charset,sign_type) are needed.
2.cacert can be found in offical's PHP's demo,pay attention to path.
3.transport should be set as https
4.To use notify/return ,please append a line in alipay.js
exports.AlipayNotify =AlipayNotify;
so you could use
var AlipayNotify = require('alipay').AlipayNotify,
so that
alipayNotify.verifyNotify or alipayNotify.verifyReturn
is ok
5.one more thing,alipayNotify.verifyNotify use post,please use req.body to get post content
第4条不用加吧。
@coolicer 问下, 你的notify_url 请求是否正常? 我的 notify_url 一直有调用, 但是没有任何参数... req.query, req.body 都是{} ...
@ruandao 用alipayNotify.verifyNotify(_GET,function(verify_result){...})去接受,直接判断verify_result的值就可以了
@superlbr 谢谢
我查看了下, 有个导出的函数 alipay.create_partner_trade_by_buyer_notify(req, res)
不过依旧失败, 我是 aws 的估计可能是这个问题
以前demo里面都有配文档的,现在改成在线了,可以参考 http://open.taobao.com/doc2/apiList.htm?cid=10238