Home > Backend Development > PHP Tutorial > 微信支付APP返回-1怎么解决

微信支付APP返回-1怎么解决

WBOY
Release: 2016-06-06 20:29:10
Original
1720 people have browsed it

开发文档上面-1“可能的原因:签名错误、未注册APPID、项目设置APPID不正确、注册的APPID与设置的不匹配、其他异常等。”,但是我检查过没问题,APP用DEMO测试可以支付,但是服务端发送给APP就不行
统一支付测试过也是好的
["result"] => array(9) {

<code>["return_code"] => string(7) "SUCCESS"
["return_msg"] => string(2) "OK"
["appid"] => string(18) "******"   //绑定支付的APPID
["mch_id"] => string(10) "******"  //商户号
["nonce_str"] => string(16) "OCTmjzp0A8v7UnbD"
["sign"] => string(32) "9F50899D68ABE30F7E311D477D6C0383"
["result_code"] => string(7) "SUCCESS"
["prepay_id"] => string(36) "wx201507301633164e148bfddb0142377854"
["trade_type"] => string(3) "APP"</code>
Copy after login
Copy after login

}

发送给APP的值是:
{

<code>appid = ******;   //绑定支付的APPID
noncestr = fdcb60638d9e6e54cb702f5d5b67a4d7;
package = "Sign=WXPay";
partnerid = ******;  //商户号
prepayid = wx20150730151416e2a37094d20267969653;
sign = 835340F9670051D37BDE95A44E8138DF;
timestamp = 1438240456;</code>
Copy after login
Copy after login

}

点击支付跳到微信里,然后马上返回到APP里了


解决了,顺序搞错了,要按照文档上的顺序来

回复内容:

开发文档上面-1“可能的原因:签名错误、未注册APPID、项目设置APPID不正确、注册的APPID与设置的不匹配、其他异常等。”,但是我检查过没问题,APP用DEMO测试可以支付,但是服务端发送给APP就不行
统一支付测试过也是好的
["result"] => array(9) {

<code>["return_code"] => string(7) "SUCCESS"
["return_msg"] => string(2) "OK"
["appid"] => string(18) "******"   //绑定支付的APPID
["mch_id"] => string(10) "******"  //商户号
["nonce_str"] => string(16) "OCTmjzp0A8v7UnbD"
["sign"] => string(32) "9F50899D68ABE30F7E311D477D6C0383"
["result_code"] => string(7) "SUCCESS"
["prepay_id"] => string(36) "wx201507301633164e148bfddb0142377854"
["trade_type"] => string(3) "APP"</code>
Copy after login
Copy after login

}

发送给APP的值是:
{

<code>appid = ******;   //绑定支付的APPID
noncestr = fdcb60638d9e6e54cb702f5d5b67a4d7;
package = "Sign=WXPay";
partnerid = ******;  //商户号
prepayid = wx20150730151416e2a37094d20267969653;
sign = 835340F9670051D37BDE95A44E8138DF;
timestamp = 1438240456;</code>
Copy after login
Copy after login

}

点击支付跳到微信里,然后马上返回到APP里了


解决了,顺序搞错了,要按照文档上的顺序来

我们也遇到同样问题,你们解决了吗?

根据你的描述,预支付id生成成功的,但是支付信息提交的时候错误,检查支付信息的校验,需要把要提交的信息 和 商户的支付密钥 进行加密,生成新的sign,然后提交

楼主问题解决了么,我App微信支付开发遇到了同样的问题

我也遇到这种情况。
最后发现居然是微信缓存的问题(类似的微信分享之类也会有这种问题)。
只要去设置里面清除微信缓存就可以了。
心中无数草泥马奔腾,搞了我N天。(问候企鹅)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template