Coder Social home page Coder Social logo

jdpay's Introduction

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!

jdpay's People

Contributors

hereischen avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.