node-weixin/node-weixin-pay

发送请求方法问题

Closed this issue · 6 comments

发现支付这块请求接口比较特殊的几点:
1、需要证书加密的xmlssl请求(涉及退款功能的接口)
2、无需证书加密的xml(大部分接口)
3、微信接口直接返回文本表格(订单对账接口)
目前pay模块发送请求request方法中用的都是 xmlssl方法,对上述有两种方式并不支持。
感觉需要完善一下~

@lgyhitler
目前支付的请求应该都是基于HTTPS的。
所以pay里使用HTTPS应该是正确的。
不知道你说的是什么问题?

问题一、微信支付有些接口需要传递商户的支付接口证书文件,但是有些接口不用传,但是代码里统一都调用的xmlssl方法,这个方法要求必须传证书文件的,感觉欠妥。
问题二、微信支付对账接口正常业务返回的并不是xml格式的内容,而是一个大文本。xml2json时候会报错。目前仅发现这一个接口是这样

发自我的 iPhone

在 2016年8月9日,18:24,Eric <notifications@github.commailto:notifications@github.com> 写道:

@lgyhitlerhttps://github.com/lgyhitler
目前支付的请求应该都是基于HTTPS的。
所以pay里使用HTTPS应该是正确的。
不知道你说的是什么问题?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/1#issuecomment-238513769, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AER2s1_7taU9VzUkbTlScGz7W5mrOXgNks5qeFVJgaJpZM4Jf3nQ.

@lgyhitler

  1. 理解了。
  2. 估计是脱掉壳后不是XML。
    方便可以发个PR。

ok.最近在升级node版本,寻思把依赖也都升级一下,然后就给自己挖坑了…��o(�s□�t)o

发自我的 iPhone

在 2016年8月9日,18:48,Eric <notifications@github.commailto:notifications@github.com> 写道:

@lgyhitlerhttps://github.com/lgyhitler

  1. 理解了。
  2. 估计是脱掉壳后不是XML。
    方便可以发个PR。


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/1#issuecomment-238518391, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AER2szNfxeUKOF-SUKxd9IEHNBvZw7U7ks5qeFrkgaJpZM4Jf3nQ.

升级不是好事。
我已经将greenkeeper之类的全部都禁用了。
稳定压到一切,除非软件有缺陷。

这个很同意,不过介于我们版本略低0.10.35,还是稳定到stl版吧。

发自我的 iPhone

在 2016年8月10日,00:44,Eric <notifications@github.commailto:notifications@github.com> 写道:

升级不是好事。
我已经将greenkeeper之类的全部都禁用了。
稳定压到一切,除非软件有缺陷。


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/1#issuecomment-238613592, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AER2s2tzjMTjp2Bxx_A05eo88Tym7ImLks5qeK4MgaJpZM4Jf3nQ.