Skip to main content

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


Download files

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

Source Distribution

jdpay-1.1.6.tar.gz (251.8 kB view details)

Uploaded Source

File details

Details for the file jdpay-1.1.6.tar.gz.

File metadata

  • Download URL: jdpay-1.1.6.tar.gz
  • Upload date:
  • Size: 251.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jdpay-1.1.6.tar.gz
Algorithm Hash digest
SHA256 b627efb2a535ad2975d2de3235bd4b668337ec07a62f9612ae0efd8f64c7134e
MD5 9272c90c225a265dc9ebd3709081732b
BLAKE2b-256 79f537c95800b4641316f0aa57cfd272e99b648a140755a66248a03b7de3988b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page