Giter Site home page Giter Site logo

alipayf2f's Introduction

AlipayF2F-python

支付宝当面付python API.

#快速上手 1.pip install rsa

2.引入alipay文件到项目

3.创建alipay实例需传入app_id,private_key,public_key,还有可选的notify_url异步回调地址等

预创建订单

创建一个alipay实例

alipay = alipay(APPID,private_key,public_key,notify_url)

然后使用trade_pre_create就能生产一个二维码了

alipay.trade_pre_create("商户订单号","订单总金额","订单标题",)

正常状态下会返回一个二维码的地址,生成二维码给用户扫就可以了

用户扫码支付

用户扫码后支付宝会访问创建实例时提供的notify_url

如果想确定是否是支付宝访问只需要使用parse_response解析支付宝post来的数据即可

如果为支付宝传回记得返回success来告诉支付宝已收到

退款

使用trade_refund方法退款

alipayf2f's People

Contributors

pengfei00 avatar

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.