Code Monkey home page Code Monkey logo

Comments (10)

fzlee avatar fzlee commented on August 17, 2024

out_trade_no是整数而不是字符串?

from alipay.

chaseSpace avatar chaseSpace commented on August 17, 2024

都试过,你注意看一下debug

from alipay.

fzlee avatar fzlee commented on August 17, 2024

开启debug报错的原因是你传的支付宝公钥错了,应该用沙盒的支付宝公钥。

from alipay.

fzlee avatar fzlee commented on August 17, 2024

你编辑一下这个包的源代码,在api_alipay_trade_precreate函数的448行左右 print(data),看看你传了什么参数给支付宝吧。

from alipay.

chaseSpace avatar chaseSpace commented on August 17, 2024

没太明白,支付宝公钥是从蚂蚁金服网站我创建的应用下边上传应用私钥获取到的,为什么不用这个而使用沙盒的支付宝公钥呢?(沙盒没用过)

from alipay.

chaseSpace avatar chaseSpace commented on August 17, 2024

那我明天调试一下你说的448行,非常感谢你的SDK奉献!

from alipay.

fzlee avatar fzlee commented on August 17, 2024

debug=True之后,请求会被发送到支付宝的沙盒环境,沙盒环境的公钥和生产环境的公钥是不一样的。

如果想在线上调试,想你这样设置支付额度为1分钱就可以了,不需要传入debug

from alipay.

waketzheng avatar waketzheng commented on August 17, 2024

@fzlee 如果在SDK中把需要为字符串的参数都str()一下,debug=True时打印warning提示要使用沙箱公钥是不是会好一点。。。

from alipay.

chaseSpace avatar chaseSpace commented on August 17, 2024

发现错误了,我的subject后面加了个逗号让它变成元组了。。

from alipay.

fzlee avatar fzlee commented on August 17, 2024

@waketzheng

转换用户参数这件事情, 我应该不太会去做。关于参数的类型,用户应该去仔细看看支付宝文档了。

debug=True的提示我会在下一个版本加入。

from alipay.

Related Issues (20)

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.