Skip to content

lxneng/alipay

Repository files navigation

An Unofficial Alipay API for Python

image

image

image

Overview

An Unofficial Alipay API for Python, It Contain these API:

  • Generate direct payment url
  • Generate partner trade payment url
  • Generate standard mixed payment url
  • Generate batch trans pay url
  • Generate send goods confirm url
  • Generate forex trade url
  • Generate QR code url
  • Verify notify
  • Single Trade Query
  • Generate Refund With Pwd URL

official document: https://b.alipay.com/order/techService.htm

Install

Usage

Initialization

Or you can use seller_id instead of `seller_email`:

Generate direct payment url

Introduction: https://b.alipay.com/order/productDetail.htm?productId=2012111200373124

Generate partner trade payment url

Introduction: https://b.alipay.com/order/productDetail.htm?productId=2012111200373121

Generate standard mixed payment url

Introduction: https://b.alipay.com/order/productDetail.htm?productId=2012111300373136

Generate batch trans pay url

Introduction: https://b.alipay.com/order/productDetail.htm?productId=2012111200373121

Note: batch_list 为批量付款用户列表,具体格式如下例子:(如涉及中文请使用unicode字符)

Generate send goods confirm url

Introduction: https://cshall.alipay.com/support/help_detail.htm?help_id=491097

Generate forex trade url

Introduction: http://global.alipay.com/ospay/home.htm

Generate QR code url ~~~~~~~~~~~~~~~~~~~

Introduction: https://b.alipay.com/order/productDetail.htm?productId=2012120700377303

Note: 如果你的 biz_data 中有 Unicode 字符,在 dumps 的时候需要把 ensure_ascii 设置为 False,即 json.dumps(d, ensure_ascii=False) 否则会遇到错误

Verify notify

verify notify from alipay server, example in Pyramid Application

Single Trade Query

文档:http://wenku.baidu.com/link?url=WLjyz-H6AlfDLIU7kR4LcVNQgxSTMxX61fW0tDCE8yZbqXflCd0CVFsZaIKbRFDvVLaFlq0Q3wcJ935A7Kw-mRSs0iA4wQu8cLaCe5B8FIq

Generate Refund With Pwd URL

Introduction: https://doc.open.alipay.com/docs/doc.htm?spm=a219a.7629140.0.0.XRddqH&treeId=62&articleId=104744&docType=1

Note: batch_list 为批量退款数据集,具体格式如下例子:(如涉及中文请使用unicode字符)

Example in Pyramid Application

Include alipay either by setting your includes in your .ini, or by calling config.include('alipay').

now in your View

Reference

About

An Unofficial Alipay API for Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages