Code Monkey home page Code Monkey logo

Comments (16)

tsy12321 avatar tsy12321 commented on May 17, 2024

微信页面调用起来了么

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

没有登录的时候出现了登录页面。登录了之后然后直接就弹出支付失败没有出现页面

from payandroid.

tsy12321 avatar tsy12321 commented on May 17, 2024

你少一个参数 “ mch_id”

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

加上了还是出现支付失败。

from payandroid.

tsy12321 avatar tsy12321 commented on May 17, 2024

你的timestamp单位错了。自己再检查下所有的参数。https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_12

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

我已经把timestamp换成秒了,十位数。其他数据都是后台返回的
现在param改成了:{"appid":"wxc092bce380c0038c","noncestr":"1uT0PHHQwYwRmJPZ0NBGr8NuZQQ2R9Hi","package":"Sign=WXPay","partnerid":"1429654602","sign":"58E8313401E052505CC0B509F1CD2788","timestamp":"1484646070","prepayid":"wx20170117174110c14259b59e0856844978"}
但是依然是支付失败
我是直接将上面这个字符串传入了dopay

from payandroid.

tsy12321 avatar tsy12321 commented on May 17, 2024
  1. 检查下客户端调用api时的wxappid
  2. 检查下包名(applicationid和packageid)和签名
  3. 如果还是调用失败 返回的错误码是什么?ERROR_PAY_PARAM?

from payandroid.

tsy12321 avatar tsy12321 commented on May 17, 2024

image

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

这是param:
{
"sign": "58E8313401E052505CC0B509F1CD2788",
"partnerId": "wx20170117174110c14259b59e0856844978",
"packageValue": "Sign=WXPay",
"nonceStr": "1uT0PHHQwYwRmJPZ0NBGr8NuZQQ2R9Hi",
"appId": "wxc092bce380c0038c",
"timeStamp": "1484646070",
"prepayId": "wx20170117174110c14259b59e0856844978"
}

开放平台的包名的确是项目的包名。签名是打包后获取到的。
APPID已经更改成自己项目的APPID。
返回的是ERROR_PAY=3 支付失败。

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

我是将您的这个项目依赖到自己项目里使用

from payandroid.

tsy12321 avatar tsy12321 commented on May 17, 2024

log有么
image

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

打断点的结果是:
baseResp.errCode = -1;
baseResp.errStr = null;

from payandroid.

tsy12321 avatar tsy12321 commented on May 17, 2024

image

微信应该已经成功调用起来,回调也是对的。只是回调数据是错的。说明包名 签名都没问题。
建议检查下支付参数中的签名、prepayid的生成这些东西。

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

但是IOS端调用成功并且成功支付了。

from payandroid.

tsy12321 avatar tsy12321 commented on May 17, 2024

你把完整的传到doPay的参数再发上来

from payandroid.

HeJingWei avatar HeJingWei commented on May 17, 2024

支付成功了。服务器端重新给我返回了一套参数。谢谢你~

from payandroid.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.