skip to navigation
skip to content

jdpay 1.1.6

This is an unofficial python JingDong pay API.

# 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  
File Type Py Version Uploaded on Size
jdpay-1.1.6.tar.gz (md5) Source 2015-08-14 245KB