SkillAgentSearch skills...

Jdpay

This is a python JingDong Pay API.

Install / Use

/learn @hereischen/Jdpay
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

JDPAY京东支付


##Overview This is a python JingDong Pay API, it contains 4 main classes:

  • PayAccount
  • PayRequest
  • RefundRequest
  • QueryRequest
  • Notification
  • DownloadBill

Installation

Install using pip:

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).

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

from jdpay import PayRequest

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

QueryRequest This class handles paymment queries.

from jdpay import QueryRequest

query_request = QueryRequest(pay_account)

RefundRequest This class handles refund requests.

from jdpay import RefundRequest

refund_request = RefundRequest(pay_account)

Notification This class handls notifications send from JingDong.

return_dict, trade_dict = Notification(notification_account).get_notification(resp)

DownloadBill

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

That's it!

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated6y ago
Forks2

Languages

Python

Security Score

55/100

Audited on Jul 18, 2019

No findings