Closed whyyue closed 7 years ago
应该是新添加的字段,原文档中没有unionid。下版本会更新
好的。之前好像是用openid。现在同一个账号,网页扫码和android端第三方等登录方式的unionid相同,但openid不一样。
您好,想请教一下,企业支付总是报transfersResult为空指针,代码是这么写的: Transfers transfers = new Transfers(); transfers.setMch_appid(Appid); transfers.setMchid(Mchid); transfers.setNonce_str(UUID.randomUUID().toString().replace("-", "")); transfers.setOpenid(openId); Date startDate = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); String startDay = sdf.format(startDate); String outTradeNo = startDay + Sha1Util.random6digit(); transfers.setPartner_trade_no(outTradeNo); transfers.setCheck_name("NO_CHECK");//"NO_CHECK"||"FORCE_CHECK" transfers.setAmount(amount);//单位分 transfers.setDesc("withdraw"); transfers.setSpbill_create_ip("115.159.149.XX"); PayMchAPI.mmpaymkttransfersPromotionTransfers(transfers, Key); TransfersResult transfersResult = PayMchAPI.mmpaymkttransfersPromotionTransfers(transfers, Key);
看了好久不知道哪里有问题。。。难道不是这么用的吗
请问企业付款也是需要设置证书的吗? @liyiorg
@jinggoing 需要
微信登录官方文档中的第二步,返回的json如下: { "access_token":"ACCESS_TOKEN", "expires_in":7200, "refresh_token":"REFRESH_TOKEN", "openid":"OPENID", "scope":"SCOPE", "unionid": "o6_bmasdasdsad6_2sgVt7hMZOPfL" } 中有unionid一项,但在贵代码中,得到的SnsToken,无法getUnionid,是否是你们未写这一项呢?还是隐藏在别的地方,由于在下太粗心未找到😂
盼回复!祝好!
官方文档地址:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN