Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

This is an unofficial python JingDong pay API.

Project description

# JDPAY京东支付
------
##Overview
This is an unofficial python JingDong pay API, it contains 4 main classes:
> * PayAccount
> * PayRequest
> * RefundRequest
> * QueryRequest
> * Notification
> * DownloadBill


------

Installation
------------

Install using pip:

```bash
pip install jdpay
```
or you can refer to https://github.com/hereischen/JDPAY/dist
download the tar file.

API
---
**PayAccount**
It allows switching between differnt payment account methods such as debit card only (DO) or debit and credit card (DC).
``` python
from jdpay import PayAccount

pay_account = PayAccount(DC)

```
pay acoount will be initialised to a serious settings that support both debit card and credit card.


**PayRequest**
Post payment data
``` python
from jdpay import PayRequest

jd_pay = PayRequest(pay_account)
form_data = jd_pay.post(pay_params)

```

**QueryRequest**
This class handles paymment queries.
``` python
from jdpay import QueryRequest

query_request = QueryRequest(pay_account)

```
**RefundRequest**
This class handles refund requests.
``` python
from jdpay import RefundRequest

refund_request = RefundRequest(pay_account)

```

**Notification**
This class handls notifications send from JingDong.
``` python
return_dict, trade_dict = Notification(notification_account).get_notification(resp)

```

**DownloadBill**
``` python
bill = DownloadBill().get_bill(bill_date='2015-07-08', suffix='_0430')
```

------
That's it!


Changelog
==============================
1.1.6 - Auge.14, 2015
------------------------------
- a bug fixed in query fixed

1.1.5 - Jul.17, 2015
------------------------------
- Added date_validation() in DownloadBill()


1.1.4 - Jul.10, 2015
------------------------------
- Fixed a bug in Notification()

1.1.3 - Jul.09, 2015
------------------------------

- Updated DownloadBill(object).get_bill() for bill downloading

1.1.2 - Jul.08, 2015
------------------------------

- Added class DownloadBill(object) for bill downloading.

1.1.1 - Jun.30, 2015
------------------------------

- Changed get_notification method.
It will return a more detailed notification dict
containning all the information provided.

1.1 - Jun.26, 2015
------------------------------

- Changed verify_merchant_sign_parse_response method.
It will raise exceptions if get date faild.
and the return res will macth JD's logic.

1.0 - Jun.15, 2015
------------------------------

- Initail commit

Project details


Release history Release notifications

This version
History Node

1.1.6

History Node

1.1.5

History Node

1.1.4

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
jdpay-1.1.6.tar.gz (251.8 kB) Copy SHA256 hash SHA256 Source None Aug 14, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page