Code Monkey home page Code Monkey logo

Comments (9)

fzlee avatar fzlee commented on August 17, 2024

0.6.7已经修复这个问题

from alipay.

openpython avatar openpython commented on August 17, 2024

已更新至0.6.7,错误提示还一样

from alipay.

fzlee avatar fzlee commented on August 17, 2024

可以贴一下你的代码吗? 如果安装了requete, 可以贴上你的request版本号吗?

from alipay.

openpython avatar openpython commented on August 17, 2024

requests-2.12.3
部分代码:
` o=Order.query.filter(Order.id==oid,Order.user_id==uid).first()
if not o:
return redirect(url_for('frontend.common_error', err_code=502))

order_string = alipay.create_web_trade(out_trade_no=o.order_no, total_amount=str(o.total_fee), subject=o.subject, extra_common_param='mmdqfs|mjhcq8', return_url="http://pay.xxxx.com/alipay/return_result/")    

return redirect('https://mapi.alipay.com/gateway.do?%s' % order_string)`

from alipay.

fzlee avatar fzlee commented on August 17, 2024

你这边运行一下 type(o.subject), 是unicode还是str对象?

from alipay.

openpython avatar openpython commented on August 17, 2024

检测是 <type 'unicode'>

from alipay.

fzlee avatar fzlee commented on August 17, 2024

subject=o.subject.encode("utf-8") 应该可以暂时解决问题。你可以试一下

目前似乎我这边需要规范一下传入的字符串的数据类型,比如不论python2 还是 python3,都需要为unicode

from alipay.

openpython avatar openpython commented on August 17, 2024

不报编码错误了,但是alipay.com提示集成错误:

调试错误,请回到请求来源地,重新发起请求。
错误代码 ILLEGAL_SIGN

这可能是哪里的问题呢?

from alipay.

fzlee avatar fzlee commented on August 17, 2024

签名错误,你先确认一下自己使用的签名私钥,它对应的公钥传给了支付宝

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.